Answer the question
In order to leave comments, you need to log in
How to find a substring between two identical, arbitrary tokens?
I have strings of type Something $token Something$toke
token
can consist of any characters. Tokens are not known in advance.
Tell me, is it possible to somehow find what is between two tokens using regexp, preferably with one regular expression?
To make it clearer:
from Hello $token world$token
you need to get world
from Hello $foo $bar 123 $foo
you need to get $bar 123
, etc.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question