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

From the string above, some of the material I need to extract spans multiple lines:

eg



Quote:Name: John Doe
MRN: 12345678
exam: xray
BeginShortReport
This is the text of the report
This is line 2 of the multiline report

This is the 4th line of the report which comes after an empty line, etc
EndShortReport

I would like to get the text between BeginShortReport and EndShortReport.
I have tried the following but with no luck:

Code:
Copy      Help
str longreport shortreport
findrx(longreport "(?<=BeginShortReport) (?=EndShortReport)" 0 8 shortreport2 1)

I know I must enter something that says get any character between BeginShortReport and EndShortReport but I can't figure it out.

Thanks for any help,

Stuart


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)