1716510480 Comment: 9497 6/1/2019 7/10/2019 $20.77 $0.00 $20.77
Total: $20.77
Hai i need to extract the 9497 number in after comment
could u please tell me the regex options
1716510480 Comment: 9497 6/1/2019 7/10/2019 $20.77 $0.00 $20.77
Total: $20.77
Hai i need to extract the 9497 number in after comment
could u please tell me the regex options
Use this
text.Substring(text.IndexOf("Comment: ")+"Comment: ".Length).Split(Environment.NewLine.ToCharArray)(0)
Hi @veera_g
Kindly try with this buddy
if the input string is like this
in_str = β1716510480 Comment: 9497 6/1/2019 7/10/2019 $20.77 $0.00 $20.77
Total: $20.77β
then the output will be
out_Str = Split(Split(in_str.Split(Environment.Newline.ToArray())(0),": β)(1).ToString.Trim,β ")(0).ToString.Trim
Cheers @veera_g
@veera_g you can try also this buddy split(text.Split(environment.NewLine.ToArray(),stringsplitoptions.RemoveEmptyEntries)(0)," ")(2).ToString
[quote=βveera_g, post:5, topic:132061β]
Its fine working for me i have another doubt suppose i need after the num like 1716510480 after 9497 means
1716510480 9497 6/1/2019 7/10/2019 $20.77 $0.00 $20.77
Comment:
[/quote]Its fine working for me i have another doubt suppose i need after the num like 1716510480 after 9497 means
1716510480 9497 6/1/2019 7/10/2019 $20.77 $0.00 $20.77
Comment:
i didnβt get this buddy
kindly come again once
Cheers @veera_g
After the 1716510480
β1716510480 Comment: 9497 6/1/2019 7/10/2019 $20.77 $0.00 $20.77"
do you mean in the highlighted one in the above string as output
Cheers @veera_g
am waiting your replay
is this needed @veera_g
text.Substring(text.IndexOf("1716510480 ")+"1716510480 ".Length).Split(Environment.NewLine.ToCharArray)(0)
s we needed and we need another if comment is present or not present we extract the 5 digit number
Any possible code to get 5 digit number or 4 digit number after the 1716510480
str.Substring(str.IndexOf(β1716510480β),5)
Try this to get 5 characters after that particular string
s got it
Thanks for your quick help
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.