php - Matching all strings of the format Names#Age#Gender#City -


I have some strings in the string, such as format name # , or name #

or name # age # gender or name # age # gender # city

I just want to match that string It satisfies

name # age # gender # city # .

I want to regex this cron job for the job I will be using in this question

Select text_message from incoming_sms where text_message REGEXP '^ \ w + (? : $ \ W +) + $

My regex ^ \ w + (?: $ \ W +) + $ does not seem to work.

How can I fix my code name # age # gender # city okay ?.

  ^ ([^ # \ n] + #) {3} [^ \ n #] + $  

Try it out. See the demo.


Comments

Popular posts from this blog

sql - Find last match with latest inserted name in table -

c# - XML serialize base class without knowing derived class -

Send innerHTML text in URL in JSP -