I am working with regexes in Access VBA (VBScript Regular Expressions 5.5) and there's some behaviuor I dont understand. Is this normal regex behaviour? Why?
The input is
some html ... id="devices_internal_table">Some interestingText</a>
< more html
I need to find different things here, but I am stuck with this:
pregexp.Pattern ="devices_table_internal([.]*?)\n<" REM (A1)
pregexp.Pattern ="devices_table_internal([.\n]*?)<" REM (A2)
pregexp.Pattern ="devices_table_internal(.*?)\n<" REM (B1)
pregexp.Pattern ="devices_table_internal([.""<>\n]*?)<" REM (B2)
pregexp.Pattern ="devices_table_internal([.""<>]*?)\n<" REM (B3)
pregexp.Pattern ="devices_table_internal((.*\n)*?)<" REM (B4)
patterns A dont give any results while patterns B do.
- isn't A1 equal to B1 ?
- B1 suggests, that <>and" are part of . but why then doesn't A2 work (but B2 does)?
- same goes for B4/A2: multiple lines followed by < works, but multiple [characters or linebreaks] followed by < doesn't ?
As I need some different regexes I am more interested in explanations to the three weird things than solutions as to how I might find the "interesting Text" ;)