Please use @Didelphodon's excellent Rexman
It is written with PureBasic and it will give you the exact regex to use in PureBasic
so you can try different permutations of your code until you get it right. It even comes with a regex cheat sheet.
Norm.
IsRegExp command
Re: IsRegExp command
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
- marcoagpinto
- Addict
- Posts: 1039
- Joined: Sun Mar 10, 2013 3:01 pm
- Location: Portugal
- Contact:
Re: IsRegExp command
Hello!
I seemed to have fixed the prefixes decoding.
All I had to do was to add a "\b" to the beginning of the pattern and remove the $ from the end.
However, it gives a false positive if the word has a ' in it.
How can I fix it?
Thanks!
Kind regards,
EDIT: It also triggers #True with a$="aster-s"
I seemed to have fixed the prefixes decoding.
All I had to do was to add a "\b" to the beginning of the pattern and remove the $ from the end.
However, it gives a false positive if the word has a ' in it.
Code: Select all
#RegularExpression=1
a$="aster"
b$="[^abehilmopru]."
; Try to match regular expression - 27/JAN/2019 + 28/JAN/2019 + 31/JAN/2019
CreateRegularExpression(#RegularExpression,"\b"+b$,#PB_RegularExpression_DotAll)
match=MatchRegularExpression(#RegularExpression,a$)
FreeRegularExpression(#RegularExpression)
Debug match
a$="aster's"
b$="[^abehilmopru]."
; Try to match regular expression - 27/JAN/2019 + 28/JAN/2019 + 31/JAN/2019
CreateRegularExpression(#RegularExpression,"\b"+b$,#PB_RegularExpression_DotAll)
match=MatchRegularExpression(#RegularExpression,a$)
FreeRegularExpression(#RegularExpression)
Debug match
How can I fix it?
Thanks!
Kind regards,
EDIT: It also triggers #True with a$="aster-s"
- marcoagpinto
- Addict
- Posts: 1039
- Joined: Sun Mar 10, 2013 3:01 pm
- Location: Portugal
- Contact:
Re: IsRegExp command
Buaaaaaaaaaaaaaa....
I found the answer thanks to Microsoft Expression Web:

I found the answer thanks to Microsoft Expression Web:
