开发者

Regular Expression conditionals, e.g. "and" / "or" [closed]

开发者 https://www.devze.com 2023-04-06 19:00 出处:网络
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post.
Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

开发者_Python百科

Closed 9 years ago.

Improve this question

Is there a way using regular expressions to find

grep 'a &| b &| c' #pseudo code

If 'a' is found also check for 'b' and if 'a' is not found also check for 'b'? etc...


You can just nest the needed values in parenthesis for and support. Yes there is or | support.

(ab)|(a(c|b))

I would have left it in a comment but don't have enough rep.


Is this what you mean?

(a)?(b)?(c)?
0

精彩评论

暂无评论...
验证码 换一张
取 消