Hi,
How do I ignore multiple blank lines when finding/replacing text?
e.g.
File1
.nextBtn
{
float:right;
}
File2
.nextBtn
{
float:right;
}
I would like my find to match both files by ignoring the blank line in File1
Regards
Dave
Ignore blank lines
Re: Ignore blank lines
Insert a (\r\n)? in-between each pair of lines where a blank line might occur, or (\r\n)* for any number of blank lines.
It would be easier to have an option that would "skip" (just accept) blank lines in a regular expression anyway, if they can occur at any place.
It would be easier to have an option that would "skip" (just accept) blank lines in a regular expression anyway, if they can occur at any place.
Re: Ignore blank lines
\s+ or \s* is your friend.
\s means any space character, including tabs, spaces, \n, \r.
+ means one or more of them, * means zero or more of them.
\s+ will find any number of blank lines between text entities.
I usually replace all spaces in a regular expression with \s+, because you never know when your line will break. I found out the hard way, TC not finding text I KNEW was there. The HTML editor just had broken off the line at some random point.
Note: \s+ will NOT find HTML codes for hard spaces such as
\s means any space character, including tabs, spaces, \n, \r.
+ means one or more of them, * means zero or more of them.
\s+ will find any number of blank lines between text entities.
I usually replace all spaces in a regular expression with \s+, because you never know when your line will break. I found out the hard way, TC not finding text I KNEW was there. The HTML editor just had broken off the line at some random point.
Note: \s+ will NOT find HTML codes for hard spaces such as