I’m trying to write a regular expression which returns a string after a particular string.
The string is
result I’m expecting is —
Here is the expression i’m using
Okay so this should work:
I would advise looking over the syntax of regex again, because yours was not even matching the colons correctly. Look behinds
(?<=pattern) match before the pattern you want to capture. Likewise look aheads
(?=pattern) match after the pattern.
You can test your regex online here (or many other sites). They will show you the matching groups and errors, but will also explain what certain parts of the pattern do.