From string a
I would like to extract everything between |Request|
and the next occurance of |
:
a <- "|Request|\nSample inlet port of the HIP cartridge with |overflow| formed "
gsub(".*\\|Request\\| (.+) |.*", "\\1", a)
Applying gsub this way did not yield the expected result. How could I do it instead?