Click here to Skip to main content
15,886,664 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
String:
XML
string s = @"<0800><P0>1005150101040</P0><P1>1005150101050</P1><P2></P2><P3></P3><P4></P4><P5></P5><P6></P6><P7>100515010101</P7>
<P8></P8><P9></P9><P10></P10><P1>000002</P11><P12></P12><P70>002</P70><P127></P127></0800>
"
Posted
Updated 5-Oct-15 21:41pm
v4
Comments
DamithSL 6-Oct-15 0:12am    
what are the conditions to match when you search values?
dan!sh 6-Oct-15 0:44am    
Is it XML? And have you tried some code? Update the question with code you have tried.
Md. Shihab Uddin 6-Oct-15 1:51am    
it is a string
Richard MacCutchan 6-Oct-15 3:03am    
It's XML so you can use one of the .NET XML classes to decode it.

1 solution

Try a Regex:
(?<=\<P\d\>)\d{10,13}(?=\</P\d\>)
Should do it.
 
Share this answer
 
Comments
Md. Shihab Uddin 8-Oct-15 0:30am    
Thanks
OriginalGriff 8-Oct-15 1:57am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900