I have a weird issue going on with _XMLUpdateField. I'm trying to update a field with a very specific regex, but it keeps adding & everywhere I want just a &. Here's the specifics of what I've tried so far:
This:
"(?" & chr(38) & "<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})"
results in this:
(?<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})
This one:
"(?<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})"
results in:
(?<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})
And this one:
"(?&<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})"
results in:
(?&<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})
All of these are the end bits of
_XMLUpdateField("//TransactionDate/RegexForYear","(?&<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})")
this example being the last attempt.
It does find the field correctly, and non-special character fields update without issue. Is there something I'm missing?
This:
"(?" & chr(38) & "<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})"
results in this:
(?<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})
This one:
"(?<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})"
results in:
(?<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})
And this one:
"(?&<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})"
results in:
(?&<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})
All of these are the end bits of
_XMLUpdateField("//TransactionDate/RegexForYear","(?&<=^\s*\d+\s+\w+\s+\w+\s+)([0-9]{4})")
this example being the last attempt.
It does find the field correctly, and non-special character fields update without issue. Is there something I'm missing?