I use visual-regexp
to make query regexp search. Consider this text:
\enquote{\Large{text1}} \enquote{\Large{text2}} \enquote{\Large{text3}} \enquote{\Large{text4}}
I want regexp to match every and single macro group (the 4 groups). I invoke a query regexp by C-c q
and entered this regexp:
\(\\Large{\)\(.?+\)\(}\)\(}\)
Problem is that it returned one match instead of 4 matches:
the \(.?+\)
was very greedy to match all 4 macro groups.
But, when I get each of the 4 groups in its own line I get the desired effect:
Now I could do replace with: \2\4
to get the desired result:
So what I was missing when all were on the same line?
Plus, can you please recommend any good documentation on using regexp/grep in Emacs?
.+?
and not.?+
..