Regular Expressions: Is there an AND operator?

后端 未结 12 2044
刺人心
刺人心 2020-11-21 06:34

Obviously, you can use the | (pipe?) to represent OR, but is there a way to represent AND as well?

Specifically, I\'d like to

12条回答
  •  眼角桃花
    2020-11-21 07:13

    The order is always implied in the structure of the regular expression. To accomplish what you want, you'll have to match the input string multiple times against different expressions.

    What you want to do is not possible with a single regexp.

提交回复
热议问题