Pattern matching with sed
Hi all,
In the below sentence, I am trying to match title="data under first Double quotes". Code:
<A title="Puppy Linux 5.0 Released" href="http://lwn.net/Articles/388754/" rel=bookmark><FONT color=#ffffff size=2><STRONG>Puppy Linux 5.0 Released Code:
sed 's/title=".*"/news/' news I came to know that I have to use '?' somewhere to get rid of this, But how ? Thanks |
Rather than "any char" I prefer "any non-terminating char" - when you know the terminating char; double quote in your case.
Code:
sed 's/title="[^"]*"/news/' news |
Quote:
Thanks it worked.. |
Please mark as SOLVED if you have your answer
|
All times are GMT -5. The time now is 10:41 AM. |