Quantcast
Channel: Extracting a specific string after a given string from HTML file using a bash script - Ask Ubuntu
Browsing latest articles
Browse All 4 View Live

Answer by Eliah Kagan for Extracting a specific string after a given string...

The string you're looking for always has MOM: before it, but you have not said if it always has " after it. For the purpose of this answer I will assume that you are looking for strings that are...

View Article



Answer by user216043 for Extracting a specific string after a given string...

grep -Po 'MOM:\K[^"]+' file.html Warning: this is not a very robust solution; And your HTML is not valid

View Article

Answer by Zanna for Extracting a specific string after a given string from...

I can't sensibly advise doing this, because parsing html with regex is not likely to end well but you might be able to get the string MANIKA with sed -nr '/MOM:/ s/.*MOM:([^"]+).*/\1/p' file It works...

View Article

Extracting a specific string after a given string from HTML file using a bash...

I have a HTML file momcpy.html from which I want to extract a specific string after a given string. File content is like: <tr><br> <th height="12" bgcolor="#808080"><label...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images