Page 1 of 1
REX help for Data From Field
Posted: Wed Jul 21, 2010 4:05 pm
by rgwin0
Hi, I want to use Data From Field to parse the Modify Date from this html:
<!-- ITEMDATE: 2010-07-21 13:00:00 -->
Can you help me with the REX search and replace expressions?
Thanks,
rob
REX help for Data From Field
Posted: Wed Jul 21, 2010 4:20 pm
by mark
One posibility is
search: <\!-- \RITEMDATE: =....-..-.. ..:..:..= -->
replace: \2
Variations could ignore the open and close comments to find the tag in the text as well, ignore the case of the tag, be more relaxed about the type and amount of whitespace, and be more restrictive about the allowed digits within the date.
REX help for Data From Field
Posted: Thu Jul 22, 2010 1:39 pm
by rgwin0
Thanks, that should work fine. Related to this, I couldn't seem to find the documentation about how the replace syntax works (without parentheses as in regex). Does the 2 relate to the 2nd "repetition operator"?
REX help for Data From Field
Posted: Thu Jul 22, 2010 2:16 pm
by mark
Yes. The docs mention that it uses "sandr" syntax but doesn't point you to the sandr docs. Here's a link
http://www.thunderstone.com/site/vortex ... rings.html