Hai,
I need to split a string
Invoice_1234_abc.pdf
Output should be 1234 & abc only I need
Split (input.tostring, “_”)(1) this query I used
But it throwing only 1234 I need abc also
How can I achieve this thing please help me
Thanks & regards,
Sivasankar
prasath_S
(prasath S)
2
Hi @siva_sankar
Please try this,
Split(input.tostring, “_”)(1) + Split(input.tostring, “_”)(2)
Thanks
Yoichi
(Yoichi)
3
Hi,
How about the following expression?
System.Text.RegularExpressions.Regex.Match(System.IO.Path.GetFileNameWithoutExtension(yourString),"\d.+").Value
Regards,
It’s cool but in output it’s coming
1234abc.pdf also
How can we remove that .pdf
prasath_S
(prasath S)
5
@siva_sankar
Please try this
Split(input.tostring, “_”)(1) + Split(input.tostring, “_”)(2).split("."c)(0)
Thanks
1 Like
Thanks for your help
I done with your help
Thanks & regards,
Sivasankar
1 Like
Hi @siva_sankar
Try this out
out = input.Split("_"c)(1)+(input.Split("_"c)(2)).ToString.Split("."c)(0)
thanks ,
robinnavinraj S
1 Like
system
(system)
Closed
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.