grep regex: search for any of a set of words -


i want search large set of files set of words in order, or without spaces or punctuation. so, example, if search hello, there, friend, should match

hello there friend friend, hello there theretherefriendhello 

but not

hello friend there there friend 

i can't figure out way this. possible using grep, or variation of grep?

is possible using grep, or variation of grep?

you can use grep -p ie in perl mode,the following regex.

^(?=.*hello)(?=.*there)(?=.*friend).*$ 

see demo.

https://regex101.com/r/sj9gm7/37


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -