1

How to use "&&" and "||" in php functions like preg_replace & preg_match.

3
  • 2
    You should learn regular expressions. Commented May 26, 2011 at 2:13
  • You'll need to explain what you're trying to accomplish with this Commented May 26, 2011 at 2:14
  • Please provide an example of the code for which your question applies. Commented May 26, 2011 at 2:14

1 Answer 1

2

You can use | as or in a regular expression.

^(abc|cde)\d$
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.