tags:

views:

71

answers:

4

Hi any idea what this is matching thanks

preg_match('/^[1-8](0|5)$/', $myValue)
+4  A: 

Beginning of string, digit from 1-8, capturing group matching either 0 or 5, end of string.

Matthew Flaschen
Conclusion: waste of time compiling and executing regex.
MvanGeest
Formatting problem; look again
Joey
Won't do -1 but answer is invalid now :)
MvanGeest
+4  A: 
  • Start of string
  • A digit between 1 and 8
  • Either a digit 0 or 5
  • End of string
Joey
+1  A: 

This might be useful to you, enter the regular expression and view for yourself:

http://strfriend.com/

The site will depict what a given regular expression will match

Chief17
great resource!
Justin L.
+1  A: 

It matches an occurrence of 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, or 85 (with a trailing newline character \n if one is present).

salathe