Is there a way to get the string between.. lets say quote ”
The problem with using Indexof and substring is that it gets the first ” and last ” but not the pair. Like
“Hello” “WHY ARE” “WWWWWEEEEEE”
It will get
Hello” “WHY ARE” “WWWWWEEEEEE
I want it to get to array > Hello, WHY ARE, WWWWEEEEEE
Is there any way to do this?
Something like this?
If
subjectStringwas “Hello” “WHY ARE” “WWWWWEEEEEE”, that should give you a list containing:A more compact example which uses the static
Regexclass instead, and just writes the matches to console instead of adding to a collection: