I am looking for the regex to stet if a string starts with another string. This has to be RegEx and it has to be PHP regex.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
PHP.net Regular Expressions
preg_matchreturns either0for no matches found, or1, becausepreg_matchstops at the first match. If you want to count all matches, usepreg_match_all.Check the PHP website if you have more trouble.