I have bash function which run python (which return all finded regex from stdin)
function find-all() {
python -c "import re
import sys
print '\n'.join(re.findall('$1', sys.stdin.read()))"
}
When I use this regex find-all 'href="([^"]*)"' < index.html
it should return first group from the regex (value of href attribute from file index.html)
How can I write this i sed or awk?