How to split or trim or slice a String

ursnani
Giga Guru

Hi All,

 

I am trying to split/trim/slice the following string "aaaaaaa-test1:\ritmtest123_testgrow_test\testtest"  and I am trying to get value "test"(3rd value) from "ritmtest123_testgrow_test".

I Tried to Split with "\" but dint work so tried Trim which didnt work either.

Can someone please help with extracting the above mentioned string from the given string.

 

Thanks

1 ACCEPTED SOLUTION

ursnani
Giga Guru

Hi All,

 

Thanks for all your response, but the path which user provide will not be consistent, so I used the indeOf() to search for the word to achieve what I need.

 

Again Thanks for all your responses.

 

Thank you.

View solution in original post

7 REPLIES 7

ursnani
Giga Guru

Hi All,

 

Thanks for all your response, but the path which user provide will not be consistent, so I used the indeOf() to search for the word to achieve what I need.

 

Again Thanks for all your responses.

 

Thank you.

Hi,

Yea, please try to give more information in the future as to what you're trying to do. You initially just asked for that specific string, but behind the scenes you knew it was for a larger requirement that could be changing. So with you specifically asking about split, trim, etc...you forced the conversation in that direction. People then spent time replying to that, but really, you needed something else?

If you can, just in the future, please try to give as much information as you can.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi Allen,

I totally Agree with what you said, i didnt give enough information in my question. My requirement is based on a specific word in the Export path given by user, i have to do some specific things. So I should have asked this in my question but instead I asked in a different way which resulted in discussion going in other way.

 

Thanks,