Monday 15 June 2015

Regex match against block of text -



Regex match against block of text -

i'm having 1 of moments can't think of right syntax regex.

i've got block of text below

config lines config lines config lines config lines config lines interface ethernet0/0 description "my interface" ip address 1.2.3.4 255.255.255.255 service-policy output my-service-policy config lines config lines config lines config lines

the match trying create interface ethernet0/0 present, , 'service policy output my-service-policy' exists, having problem matching first , lastly lines in 1 regex.

in language coding?

generally can access first origin of string / origin of each line in multi-line pattern via ^ sign.

is copied right, request line begins white space? can p.e. in php: $result = preg_match('/^\s/');

regex

No comments:

Post a Comment