Thursday, January 31, 2019

regex - Regular Expressions AND

I am really not good with regular expressions and I come here for some assistance :). I am trying to combine regular expressions with something like AND. For example if we have a text file with:



abc1-xyz

abc1-ertxyz


abc1xyz

postxyz

abc1


I would like to match everything that starts with "abc1" AND also contains the letters "xyz" somewhere.



I know that I can start with:




/^abc1/


but I am not sure how to combine so it can also match to contain "xyz".



Thank you for your assistance in advance.

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...