I don't quite understand trim

< sidoNm>aaa< /sidoNm>

< orgAndTeamNm>bbb bbb< /orgAndTeamNm>

aaa
bbb bbb

I’m trying to extract it like this, but there’s a string error of trim.

var_name.Split((Split(text,“<”)(0).ToString),“>”)(1).ToStringSplit((Split(text,“<”)(0).ToString),“>”)(1).ToString

Hello @CK_CHECK
Try regex method

system.text.regularexpressions.regex.matches(yourstring,"(?<=\>).*(?=\<)")(0).tostring    -->aaa
system.text.regularexpressions.regex.matches(yourstring,"(?<=\>).*(?=\<)")(1).tostring     --> bbb bbb

image

thanks for you @Gokul_Jayakumar

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.