[code] Regular expression idiosyncrasy

From: Danny MacMillan <foicica.att.nekulturny.org>
Date: Wed, 25 Oct 2017 15:45:47 -0600

Hi,

I'm a little confused by how textadept does regular expression search
and replace. Suppose I have a file with these contents this:

apples
oranges
bananas

And I do a regular expression search and replace:

Find: ^(.*)$
Replace: I like \1 ... I really like \1

This is what textadept gives me:

I like apples
  ... I really like apples
I like oranges
  ... I really like oranges
I like bananas ... I really like bananas

But this isn't what I would ever want. In the tool I used to use, the $
matches the end of the line which prevents .* from matching it.

Is there a way to get this to work the way I want? in case it's not
clear, the newlines preceding the ellipses are unwanted.

Thanks,

-- 
Dan
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 25 Oct 2017 - 17:45:47 EDT

This archive was generated by hypermail 2.2.0 : Thu 26 Oct 2017 - 06:45:41 EDT