Find a line starting with IST, then either a \n not followed by IST or other characters, then your line number. Tweak the captures/(^IST.{6}).*(?:\n(?!^IST)|.)*(^335794.*)/m
A solution based around a HTML/XML parser might be better. You may even be able to use an xpath query to get what you want
In reply to Re: Regex :: Line Traversal
by bsb
in thread Regex :: Line Traversal
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |