[AccessD] vbscript.regex replacement?
Ryan W
wrwehler at gmail.com
Wed Nov 2 08:56:37 CDT 2022
Has anyone found or use any other library for regex in Access?
I'm finding some of the limits of what the 5.5 library does:
- No \A or \Z anchors
<https://www.regular-expressions.info/anchors.html#az> to match the
start or end of the string. Use a caret or dollar
<https://www.regular-expressions.info/anchors.html> instead.
- Lookbehind
<https://www.regular-expressions.info/lookaround.html#lookbehind> is not
supported at all. Lookahead
<https://www.regular-expressions.info/lookaround.html#lookahead> is
fully supported.
- No atomic grouping <https://www.regular-expressions.info/atomic.html>
or possessive quantifiers
<https://www.regular-expressions.info/possessive.html>
- No Unicode <https://www.regular-expressions.info/unicode.html>
support, except for matching single characters with \uFFFF
- No named capturing groups
<https://www.regular-expressions.info/named.html>. Use numbered
capturing groups <https://www.regular-expressions.info/brackets.html>
instead.
- No mode modifiers <https://www.regular-expressions.info/modifiers.html>
to set matching options within the regular expression.
- No conditionals <https://www.regular-expressions.info/conditional.html>.
- No regular expression comments
<https://www.regular-expressions.info/freespacing.html#freecomment>.
Describe your regular expression with VBScript apostrophe comments instead,
outside the regular expression string.
The lack lookbehind was really hanging me up and it made me wonder if any
one has made a JS/PCRE drop in replacement library.
I found one out on github that works with VB6 but it hasn't had activity in
years and from what I can tell isn't complete:
https://github.com/jpbro/VbPcre2
More information about the AccessD
mailing list