I would like to use UltraEdit regular expression (perl) to replace the following text with some other text in a bunch of html files:
<style type="text/css">
#some-id{}
.some-class{}
//many other css styles follow
</style>
I tried to use <style type="text/css">.*</style>
but of course it wouldn't match anything because the dot matches any character except line feed. I would like to match line feed as well and the line feed maybe either \r\n
or \n
.
How should the regular expression look like?
Many thanks to you all.
Normally dot .
matches all characters other than new line. Use the s
modifier in the regex to force dot to match all characters including new line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With