regex - Regular expression for might have a space -


i trying regular expession might have space. searching occurences of

word1word2 

and

word1 word2  

i try:

grep "word1[ +]word2" mylog.txt 

but not work.

any ideas?

try

grep "word1 \?word2" mylog.txt 

Comments