Which regular expression should I use with the command grep if I wanted to match the text contained within the tag and it
and it
Here's one way using GNU grep:
GNU grep
grep -oP '(?<= ).*?(?= )' file
If your tags span multiple lines, try:
< file tr -d '\n' | grep -oP '(?<= ).*?(?= )'