Regex not working?
Posted: Thu Jul 30, 2015 9:46 pm
regexr.com says that :
<name type="personal">\n[ \t]+<displayForm>Trust</displayForm>
should accurately match
(I'm doing a find replace "personal" with "corporate" where displayForm="trust") but it doesn't work. Any ideas why oxygen's regex is different from the web engine I'm testing on?
It is also possible this could easily be done with xquery, I can identify the attributes but I don't know how to change the value.
//mods:displayForm[text()[contains(.,'Trust')]]/ancestor::mods:name/@type correctly identifies the "personal" attributes I need to change.
<name type="personal">\n[ \t]+<displayForm>Trust</displayForm>
should accurately match
Code: Select all
<name type="personal">
<displayForm>Trust</displayForm>
(I'm doing a find replace "personal" with "corporate" where displayForm="trust") but it doesn't work. Any ideas why oxygen's regex is different from the web engine I'm testing on?
It is also possible this could easily be done with xquery, I can identify the attributes but I don't know how to change the value.
//mods:displayForm[text()[contains(.,'Trust')]]/ancestor::mods:name/@type correctly identifies the "personal" attributes I need to change.