I’m writing a regex that will find either
- 1 or more dots
..........followed by a space or not followed by anything at all - 1 or more question marks
??????again followed by a space or not followed by anything at all
How do I write this regex so I can have it do this or that?
(you just need to escape a
.or?with a\to match it literally, since those characters have special meanings in regular expressions.)Prefix either of these with
^if you want to match lines containing only your pattern.