i want to check 2 patterns using regex.
can i check those both patterns in the same time (like if(condition1 | condition2) condition).
any idea?
You can do it exactly the way you did, with pipe separating the two+ expressions
For instance: The regular expresion (abc)|(def) would match abc OR def
(abc)|(def)
abc
def