0

i would like to match all strings that contain none of these characters "<",">","=" with QRegExp (Qt). With the folloing regexp, this is not working:

 "^[^><=]+$"

why? to me it means: beginning of string, one or more characters that are not >,<,= and end of string

thanks

EDIT

i would like to match

BUILD

for instance, and i would like not to match

BU<ILD
kiriloff
  • 25,609
  • 37
  • 148
  • 229
  • It often makes sense to provide an example of input that is being matched where you don't expect it. It provides a test-case for people answering your question and reduces the amount of guesswork. – pmr Oct 18 '12 at 13:20
  • 2
    The regexp and the samples you posted look fine. The problem could be with the way you do the matching in code. Please show the code. – detunized Oct 18 '12 at 13:33

1 Answers1

1

Try the other way to do it. Use:

^(?!.*[<>=]).*$

dlock
  • 9,447
  • 9
  • 47
  • 67