Hello all,
I'm trying to match the following in my configs, but it is not matching in NCM. Through other regex tests, it does match.
tcp-mss {
ipsec-vpn {
mss 1360;
}
Using this regex: ^tcp-mss.*\n.*ipsec-vpn.*\n.*mss 1360;\n.*\n.*}
Any thoughts?
When it comes to multi-line matches, another issue to look out for would be the line break styles. Mostly we try to match with \n but there are config files which uses UNIX EOL character "\r\n".
So as a rule of thumb one should use (\r)?\n when trying to match newline characters. If you are not sure, open the config file in Notepad++, go to View -> Show Symbol -> Show End Of Line
Hello,
Depends what you are looking for.
I suppose it is Junos OS. The char "^" for beginning of line.
Regards,
Mateusz
Thanks for posting this - it solved the problem I was having.
chrismepa, make sure you mark his answer as correct.
I wasn't the original poster of the question in this thread - just came across it while searching the forum. I can't see where I can mark the answer as correct - - I clicked on like if that helps.
Oh, indeed. Liking it helps as well, so that if other users experience the same issues, the know they can trust the solution. Thank you!