I use pcregrep to find patterns over multiple-lines in html code.
I try to match something that looks similar to this:
<some-html-stuff>
sometext<more-html-stuff>
The space between sometext
and the beginning of the line equals exactly six tabs. Since the expression \s
matches tabs, linebreaks and whitspaces I thought that
pcregrep -M -o -H "(?<=some-html-stuff\>[\s]{7})[A-Za-z0-9]*" /path/file.html
would do the job for me. but it does not (I added an additional one for the break). I actually tried this with several variations of the number but neither works.
What did I oversee?
edit:
the match should be sometext
without any whitespaces before.