开发者

What would this regex match?

开发者 https://www.devze.com 2023-01-03 19:22 出处:网络
Hi any idea what this is matching thanks preg_match(\'/^[1-8](0|5)$/\', $myVa开发者_StackOverflow社区lue)

Hi any idea what this is matching thanks

preg_match('/^[1-8](0|5)$/', $myVa开发者_StackOverflow社区lue)


  • Start of string
  • A digit between 1 and 8
  • Either a digit 0 or 5
  • End of string


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


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


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消