Hi all, I have what's probably a simple question, but it stumping me. I am trying to develop a multi-line regex that will look through a text file and look for any lines that start with an ipaddress, but also the next line must contain "OS Type: unknown" and then insert a carriage return in front of the line with the ip address above that. I cant insert a CR in front of just any line that starts with an ipaddress. i.e.
10.1.1.1
bogus info
10.1.1.2
this could be anything
10.1.1.3
OS Type: unknown
10.1.1.4
filler information
10.1.1.5
OS Type: unknown
etc....
Any assistance would be appreciated... Thanks!
</body> </html>In reply to Multiline Regex by Cosmivalin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |