command line - Windows Grep \K lookbehind not working -


i have html file contains:

<h2><a href="http://example.com" rel="bookmark" title="permanent link example.com">example.com portal</a></h2> 

i trying extract "example.com portal" using following code gnu grep 2.5.4 windows.

grep.exe -o -p -i "<h2><a\shref=.*>\k.*(?=</a></h2>)" "index.html" 

i used \k since (?<=pattern) lookbehind not allow indefinite length wildcards * in pattern. code above not work , not sure if there's wrong or if grep version not support \k lookbehind.


Comments