LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   sed and html (https://www.linuxquestions.org/questions/programming-9/sed-and-html-401799/)

naflan 01-10-2006 07:48 PM

sed and html
 
Trying to use sed to get this:
http://www.site.com/file.ext

out of this:
<a href="http://www.site.com/file.ext" "target=_blank">

I am using this:
Code:

sed -e 's/^.*href="\(.*\)".*$/ \1/'
and get this:
http://www.site.com/file.ext" target=_blank

How to fix?
Thanks,
naflan

Tinkster 01-10-2006 08:51 PM

Code:

sed -e 's/^.*href="\(.*\)" ".*$/ \1/' html.txt


Cheers,
Tink


All times are GMT -5. The time now is 04:06 AM.