The following works with when using GNU grep on Linux…
Code: Select all
joe# grep -shoP '<div class="legend"><a href="/en/map/.+?</a>' input.txt
Code: Select all
C:\>grep -shoP '<div class="legend"><a href="/en/map/.+?</a>' input.txt
< was unexpected at this time.
C:\>grep -shoP ^"<div class=\"legend\"><a href=\"/en/map/.+?</a>" input.txt
< was unexpected at this time.
C:\>grep -shoP "<div class=\"legend\"><a href=\"/en/map/.+?</a>" input.txt
The system cannot find the file specified.
C:\>grep -shoP "<div class=\"legend\"><a href=\"/en/map/.+?</a>" . input.txt
The system cannot find the file specified.
Thank you.