- Where Developers Learn, Share, & Build Careers


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

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -