Cleaning the string part before and after a specific symbol

0
If one attribute value is mian campus>>office>>class romm I want to get string part in between the symbols ยป how it can be possible?
asked
3 answers
2

See the string function calls documentation here: https://docs.mendix.com/refguide/string-function-calls#find

Use the find option to find the first occurence and use the substring to cut up the string.

Hope this helps,

Regards,

Ronald

 

answered
2

Muhammad,

I built a small test workflow that produces the results you want.  Values are below the Actions

Hope that helps,

Mike

answered
1

To build on what Ronald said, you could do the function combination like so:

$newString =substring($myString,find($myString,'>>')+1)

to find all the characters after the first >>. To remove all the characters after the second >>, you could use

substring($newString,0,find($newString,'>>')-1)

so that you return all the characters between index 0 and the index of the second >>

answered