Skip to content
Advertisement

get multiple words after a specific word of HTML using linux/unix scripting

i have a file ‘movie.html’ :

JavaScript

I want to get multiple word with pipe delimited like this:

JavaScript

I tried this code:

JavaScript

but the output isn’t as my expectation please help me, i am still a beginner

Advertisement

Answer

Parsing html with regex is not advised for several reasons (see https://stackoverflow.com/a/1732454/12957340), but here is one potential solution:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement