I have a string.An example is given below.
\r\npath1=url1\r\npath2=url2\r\npath=url3\r\npath4=url4\r\ncount=1
How can I extract path properties values from the above string.There may be many properties other than path properties.
Thr result i am expecting is
url1
url2
url3
url4
I think regular expression is best to do this. Any ideas(regular expressions) regarding the Rgular expression needed. How about using string.split method.. Which one is efficient? ..
Thanks in advance
Well, this regex works in your particular example:
What isn’t immediately obvious is if
\r\nin your strings are literally the characters \r\n, or a carriage return + new line. The regex above matches those characters literally. If your text is actually this:Then this regex will work:
And a quick example of how to use that in C#: