I have found on this answer the regex to find a string between two characters. In my case I want to find every pattern between ‘
and ’
. Here's the regex :
(?<=‘)(.*?)(?=’)
Indeed, it works when I try it on https://regex101.com/.
The thing is I want to use it with grep
but it doesn't work :
grep -E '(?<=‘)(.*?)(?=’)' file
Is there anything missing ?