Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Incorrectly Parsed Regex
#1
I'm using a regex expression that I created in Regex buddy but QM doesn't seem to parse it correctly. Althought it is a properly formatted expression, I get this error.

Error (RT) in Macro3: error in pattern: missing terminating ] for character class


here's my expression and subject

Macro Macro3
Code:
Copy      Help
ARRAY(str) M
_s.getfile("$desktop$\test.ini")
findrx(_s "\[.*[^\[]*" 0 0 M)

Code:
Copy      Help
[Rule_90]
test text

[Rule_91]
test text 2

[Rule_94]
test text 3
An old blog on QM coding and automation.

The Macro Hook
#2
[] is new line. Replace [ to [91].

or

str rx=
;\[.*[^\[]*

findrx(... rx ...)
#3
AHHHHH!!! rats I sat there and looked and looked and I knew something about the way those characters looked looked familiar but couldn't place it when I saw that error!

the str rx gave me the same error but I changed the "[" to [91] and everything is good!

THANKS
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)