I am on Unix using gvim and grep.
I need to search an xml file for the following pattern:
< sample1>
< /sample1>
So the problem is the pattern crosses a line. I am new to gvim and grep and could'nt figure this out using my regex/special characters knowledge.
One additional problem is, there is white space before the less than sign (<) in the second line. i.e.
< sample1>
< /sample1>
Could anyone please suggest how I can search for these patterns?
To search for this pattern in Vim use the /
command in normal mode:
/< sample>\n< \/sample1>
Notice that the /
character on the second line has to be escaped using the \
character.