c# - Regex to parse out IP next to a set value -


I am trying to parse an IP address from a html code beside a value. HTML code looks like this: Example

X_Value_B: 192.12.21.31

So I want to be able to check that what IP is given next to X_Value_B:

How do I parse it?

This is what I have done so far:

  Match Me = Reggae Mate (_respstr1, @ "\ b (\ d {1,3}.) {3} \ d {1,3} \ b", RegexOptions.IgnoreCase);   

However this does not specifically take the IP near X_Value_B:

Use this one:

  var match = Regex.Match (Input String, @ "X_Value_B: \s * (? & Lt; IP & gt; \ + + \. D +. \ D +. \ D +) "); If match (success.) String strIp = match. Group ["ip"]. Values;    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -