How do we match any single character including line feed in Perl regular expression?
Posted
by bobo
on Stack Overflow
See other posts from Stack Overflow
or by bobo
Published on 2010-05-20T09:24:57Z
Indexed on
2010/05/20
9:30 UTC
Read the original article
Hit count: 174
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.
© Stack Overflow or respective owner