Here is the demo String:
beforeValueAfter
Assume that I know the value I want is between “before” and “After”
I want to extact the “Value” using the regex….
pervious909078375639355544after
Assume that I know the value I want is between “pervious90907” and “55544after”
I want to extact the “83756393” using the regex….
thx in advance.
The answer depends on two things:
If it can be anything (the ? will be needed to toggle the
.*to ungreedy because “.*” also matches “After”:If you know it is digits:
If it could be any word characters (0-9, a-z, A-Z, _):