I want to use regex from a source file named source.html
or source.txt
:
<OPTION value=5> 5 - Course Alpha (3)</OPTION> <OPTION value=6> 6 - Course Beta (3)</OPTION>
to get:
5 - Course Alpha (3)
6 - Course Beta (3)
I mean I have to find a pattern:
<OPTION v
and
finding first number after it
so getting everything till I see:
</OPTION>
How can I implement it with Perl using Regex?
PS: It should read the content from a file and write output to a file.