-1

I have a file where the application is configured to check the following Regex

[\x00-\x1F\x7F&&[^\x0A]&&[^\x0D]]

Can anyone please tell me the meaning of this regex expression exactly what it means. I do know that this regex expression ignored line feed and character feed. I even validated my file on http://regexr.com/ with the above specified regex expression and it shows no match found so not understanding why the regex is getting matched in the application.

FYI: I do not want the regex to match file as it is stopping my processing.

ʰᵈˑ
  • 11,279
  • 3
  • 26
  • 49
user3384231
  • 3,641
  • 2
  • 18
  • 27
  • @JamesThorpe: The flavor used by RegExr doesn't support character-class intersection, so it interprets the ampersands in `&&` as literal ampersands, and it doesn't recognize the inner brackets as nested character classes. – Alan Moore Apr 08 '16 at 16:37

1 Answers1

0

It could be that in Java and Ruby the regex expression && refers to character class intersection, while http://regexr.com/ doesn't support that expression and is trying to match literal & symbols. The regex you posted means match any characters from \x00 to \x1f or \x7f as long as it's not \x0A or \x0D.

Community
  • 1
  • 1
Nathan Bierema
  • 1,813
  • 2
  • 14
  • 24