Hello there,
I need help regarding Regular Expression to find a tag/code called 'WAITPHOTO' in a document text. Depending on the presence of WAITPHOTO tag, I will be wrapping text around an Image(left/right of image).
FYI, All the tags starting with PHOTO will be replaced by Image at run-time.
I have some text that looks like:
Steps from the drive lead to a terrace with a stone balustrade and open views.
Front door and double glazed side window lead to the:
[PHOTOA]
This is text for PhotoA as WAITPHOTO code is followed.
[WAITPHOTO]
SITTING ROOM: 5.11m x 4.61m. Double glazed patio doors to front
terrace, with open views across Babbacombe. Double glazed window. Television
aerial point. One screened radiator. One double radiator.
[PHOTOB]
This text is NOT for PhotoB as WAITPHOTO code is not followed.
Steps from the drive lead to a terrace with a stone balustrade and open views.
Front door and double glazed side window lead to the:
[PHOTOC]
This is text for PhotoC as WAITPHOTO code is followed.
[WAITPHOTO]
I need to find out if a particular Image tag viz. [PHOTOA] is followed by WAITPHOTO tag. Also, need to ensure that a particular WAITPHOTO tag is associated with current PHOTO tag and not with the some other following PHOTO tags.
Can anyone please guide me a regular expression to achieve above.
Thank you!