Hi,
Is it possible to used named groups in VBAs version of Regular Expressions (Regexp)
Example match groups for extracting dates from strings:
will return DD.MM.YYYY or YYYY-MM-DD in submatch groups but the ordering is mixed up depending on the formatting.
A better solution would be using the named groups method.
Anyone done this?
Thanks,
Mark
Is it possible to used named groups in VBAs version of Regular Expressions (Regexp)
Example match groups for extracting dates from strings:
Code:
(?:(\d{2})\.(\d{2})\.(\d{4})\s(\d{2}):(\d{2}):(\d{2}))|(?:(\d{4})-(\d{2})-(\d{2})\s(\d{2}):(\d{2})
will return DD.MM.YYYY or YYYY-MM-DD in submatch groups but the ordering is mixed up depending on the formatting.
A better solution would be using the named groups method.
Anyone done this?
HTML:
p.s. Named groups are delimited by <name> in VB
Thanks,
Mark
Last edited: