0

I have a string -

"126_VAMSI, SWAP L. NA_8092069876"

i need to get "VAMSI, SWAP L. NA" as an output i.e. the words between the underscore, then what should be my approach.

2

1 Answer 1

2

If your question is complete and string only has two underscores and you want the middle text between underscores. Then this is your answer.

str.split("_")[1];

If your questioned string is variant pls elaborate

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.