Page 1 of 1

Regular Expressions

Posted: Mon Aug 24, 2009 4:31 pm
by DV
Post your regular expression issues, info and solutions in this forum!

Posted: Thu Aug 26, 2010 6:31 am
by SimonKSA
I can detect a form feed followed by 6 blank lines (cr lf)
\f\r\n\r\n\r\n\r\n\r\n\r\n
I want to remove the blank lines so just leave the \f
When I put \f in the replacement box it puts \f in the file and not the ascii code 0C or FF or \f.
How do I make it do that?
Many Thanks

Posted: Thu Aug 26, 2010 6:54 am
by SimonKSA
Looking at other posts I saw the solution!
By creating a group of the \f I simply use that in the replacement string.
So I search for
(\f)\r\n\r\n\r\n\r\n\r\n\r\n
and replace with
$!
Sorry for being such a wombat.
The textcrawler program is extremely useful.
Many Thanks.

Posted: Thu Aug 26, 2010 6:55 am
by SimonKSA
finger trouble. the replacement is $1