regex - Regextract Google Spreadsheet - Extract text from multiline string -


i have same issue of this post

but i'm using google spreadsheet. though it's not considered "programming" topic, regex syntax same.

i need extract text between 2 tags. eg:

start sample text end 

when apply regex syntax works:

"start(.*)end" 

but if sample text contains new line not. hints?

if want rid off new line character, 1 solution replace new line character "", e.g:

=regexextract(regexreplace(a1, "\n", ""), "start (.+) end") 

if want keep new line character, try:

=regexextract(a1, "start (\w+\n\w+) end") 

alternatively if want solution works strings , without new line character, try:

=regexextract(a1, "start (\w+|\w+\n\w+) end") 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -