0

Using the string ABC123 as my subject, matching [A-Z]* does match "ABC" as intended, but trying to match [0-9]* returns an empty string. I'm under the assumption that preg_match is greedy by default, and those two very similar regular expressions behave really differently

Tom
  • 1,217
  • 3
  • 12
  • 15

0 Answers0