php - How to search set of specific pattern string using regular expression? -


i want search set of specific string word using php regular expression. pattern this

  1. the string of 6 character length

  2. first 5 characters of string number 0-9

  3. last 1 character a-z or a-z alphabets

  4. there more 1 strings in word.

so eg. word is

037165l_55084l_1959z 

then output of regular expression should return below 2 strings

37165l 55084l 

you can use use regex in preg_match_all function:

\d{5}[a-za-z] 

regex demo


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -