0

In one codebase (PHP) I'm working on currently there is this regular expression:

!([a-z0-9]*)\.([a-zA-Z0-9]{3,4})

Which supposedly should match something like this:

a1213asddaa13124312ada.12ws

And yet it does not happen. Matching occurs only with this expression:

([a-z0-9]*)\.([a-zA-Z0-9]{3,4})

Can anybody clarify?

Darko Miletic
  • 1,168
  • 1
  • 13
  • 21

1 Answers1

1

! has no special meaning. It'll match a literal exclamation mark. a1213asddaa13124312ada.12ws does not start with one.

John Kugelman
  • 349,597
  • 67
  • 533
  • 578