Page 3 of 3
Re: IsRegExp command
Posted: Tue Jan 29, 2019 8:14 pm
by normeus
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.
Re: IsRegExp command
Posted: Thu Jan 31, 2019 12:09 pm
by marcoagpinto
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.
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"
Re: IsRegExp command
Posted: Thu Jan 31, 2019 1:24 pm
by marcoagpinto
Buaaaaaaaaaaaaaa....
I found the answer thanks to Microsoft Expression Web:
