Can you complete this Perl/bash script for a url and for a list of urls and tell me how to write several regex in the same script?
wget -Otest.html https://www.cormes.de/impressum
perl -nE 'if (/\bmailto:([\w\.]+\@[\w\.]+)/) { say $1 }' test.html
perl -nE 'if (/Straße: \[A-Za-z] [0-9]/) {say $1}'test.html
perl -nE 'if ( /PLZ und Ort: \ [0-9] {5} - [A-Za-z]) /{say $1}'test.html
perl -nE 'if (/FirstName and LastName: \[A-Za-z] [A-Za-z])/{say $1}'test.html
https://idowapro.de/impressum/#:~:text=Gesch%C3%A4ftsf%C3%BChrer%3A%20Lutz%20Teubert
perl -nE'if( 's|\([0-9]{2}\)-[0-9]{3}-[0-9]{3}-[0-9]{2}-[0-9]{2}|##-###-###-##-##|g')
To extract an email, this regex works well.
The other regex are validated by regex 101.
I have the link to get the CEO's first and last name but don't know which tool allows you to decode it to use it in the script.
Comments
Leave a comment