I have this string:
*”TEST_START” List of 4 $ test : Named num 0.983 ..- attr(, “names”)= chr “W” $ p.value : num 0.975 $ method : chr “This is the test name” $ data.name: chr “x” – attr(, “class”)= chr “htest” [1]*
I’m trying to write a regex that could isolate just the following substring withing double quotes: This is the test name
At the moment I made this regex:
method\s:\schr\s"([^"]*)"
It isolates a subset of the string. However I’d need to match just the aforementioned substring (This is the test name).
Try this,
See Lookahead and Lookbehind Zero-Width Assertions.
RegexBuddy Screenshot