Tool for Search and Replace across multiple files.
juergen
Posts: 4 Joined: Mon Feb 27, 2012 7:42 am
Post
by juergen » Sun Mar 04, 2012 10:05 am
Hello,
I need to check for spaces and tabs at the beginning and end of paragraphs.
Those two expressions work with Notepad++ but not with TextCrawler:
tab or space at the beginning
tab or space at the end
Any idea somebody why those won't work?
Juergen
Fool4UAnyway
Post
by Fool4UAnyway » Sun Mar 04, 2012 11:13 pm
It's because ^and $ don't represent the same in Notepad++ and Text Crawler (V2 and above).
In Text Crawler you could use the following expressions.
Find:
\r\n[ \t]+
[ \t]+\r\n
Replace (both) by:
\r\n
This will use the newline characters to match the start and end of lines but you will have to re-place them and also change white space at the start and end of the document manually or use the expressions you tried for that.
In Text Crawler:
^= start of the document
$ = end of the document
DigitalVolcano
Site Admin
Posts: 1863 Joined: Thu Jun 09, 2011 10:04 am
Post
by DigitalVolcano » Mon Mar 05, 2012 12:55 pm
TextCrawler can use ^ and $ for the beginning and end of a line if you check the 'Multi-line anchors' option
juergen
Posts: 4 Joined: Mon Feb 27, 2012 7:42 am
Post
by juergen » Wed Mar 07, 2012 8:48 am
DigitalVolcano wrote: TextCrawler can use ^ and $ for the beginning and end of a line if you check the 'Multi-line anchors' option
Thank you. That helped.
But wouldn't that be an error? The pattern does not stretch beyond a line boundary, does it?
DigitalVolcano
Site Admin
Posts: 1863 Joined: Thu Jun 09, 2011 10:04 am
Post
by DigitalVolcano » Thu Mar 15, 2012 8:49 pm
'Multi line anchors' means that the start and end anchors work on each line separately. Confusing reg-ex terminology i know!
Fool4UAnyway
Post
by Fool4UAnyway » Fri Mar 16, 2012 10:54 pm
Would something like "Scan text line by line" be a better description?
It doesn't explicitly talk about the line anchors, but the current text sure is confusing.
I never thought that would make the difference for which I still use Text Crawler 1!