Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular Expressions Help
#1
Hi,

I'm trying to extract some text from a page of previous udpates but I cant seem to extract the text if it is on multiple lines.

The text i am trying to extract is in bold:

Quote:This is text.

______________
TEXT GOES HERE
TEXT GOES HERE
TEXT GOES HERE
______________


More TEXT

I can extract the text if it is all on 1 line using the code below, but with the text being on multiple lines the variable returned is blank.

Here is the code I am using:

Code:
Copy      Help
findrx(description "\_{14}.*?\_{14}" 0 0 LastUpdate)

out LastUpdate

Is it possible to change this to work extracting all the lines? so the output is

______________
TEXT GOES HERE
TEXT GOES HERE
TEXT GOES HERE
______________


Regards,

Paul.
#2
I managed to do this using:

Code:
Copy      Help
findrx(description "\_{14}.(?s)*?\_{14}" 0 0 LastUpdate)
#3
"(?s)\_{14}.*?\_{14}"
#4
Cheers Gintaras Big Grin


Forum Jump:


Users browsing this thread: 1 Guest(s)