How to get particular part of the string?

0
I’m getting one string eg: ‘Surname Name (userid)’ . I just want to get userid from this string eg: ‘userid’ Which String Function will be helpful to do this?   Thanks in Advance!
asked
2 answers
1

Hi Shubham Thanekar,

              You can use substring() and find() functions to extract the text from the given string. For your reference, I am sharing that link below. It will be helpful for you. 

 

https://community.mendix.com/link/questions/114660

 

Thanks and regards,

Vijjayabharathi V

answered
0

If you need to extract 3 source from string you can use below approach.

you will get first source from below.

substring($APISource,0,find($ChatHistory/APISource,'[2]:'))  

you can chek third  source exist or not using below.

find($APISource,'[3]:')

if exist then you can extarct second source from below

substring($APISource,$SecondSourceexist,$ThirdSourceexist-$SecondSourceexist)

Than extract third source from below.

substring($APISource,find($ChatHistory/APISource,'[3]:'))

answered