Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regex: test for alphanumeric only
#4
Thanks Gintaras...

Stuart -- thanks for the tip, hadn't really used that..

I have definitely recognized the power of RegEx, and have made it my next learning priority (had to break away from my reg scheduled QM/general scripting learning to hastily learn PHP and MYSQL, but now that I've got what I need there, RegEx is next...)

I had actually come across the following...

Code:
Copy      Help
[^A-Za-z0-9_]

...thru RegEx tutorial websites, and tried hard to get it to work, but it was the use of quotes within the ( ) in QM, and not in any of the other scripting example sites that screwed me up.

Not sure if there's a general rule regarding QM and use of quotation marks vs scripting syntax. I understand use of quotes like
Code:
Copy      Help
s.from("a" b "c")
to indicate a and c are not variables but literal text, but then there's this:

To specify "match a, b, or c" in a string in standard reg ex:
Code:
Copy      Help
(a|b|c)
but in QM it is
Code:
Copy      Help
("a|b|c")
which to my first inclination would mean it's looking for the literal string between the quotes...

One day I'll get there...

Steve


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)