Regex find+replace doesn't account for ^ (beginning of line)

Report Bugs Here

Regex find+replace doesn't account for ^ (beginning of line)

Postby fberger » Mon Jul 05, 2010 10:14 am

I ran into this issue while trying to unindent lines via find+replace. I know there is a menu option for that, but that's not the issue of the bug. ;)

Steps to reproduce:

Enter:
Code: Select all
    test
        test
            test
                test


Bring up the dialog with [Ctrl]+[R] and apply
Find:^[four spaces]
Replace:[empty]
[X] Regular expression
Now hit "Find and replace".

Actual behaviour:
Editra ignores the ^ "beginning of line" symbol and offers all groups of four spaces for replacement.

Expected behaviour:
It should only find four spaces at the beginning of a line.

Reproducible: Always. Also works with any other string, not just spaces.

Editra version: 0.5.72

Thanks for considering,

Florian
fberger
User
 
Posts: 27
Joined: Mon Jul 05, 2010 9:53 am
Location: Germany

Re: Regex find+replace doesn't account for ^ (beginning of line)

Postby cody » Mon Jul 05, 2010 11:33 pm

Reproduced

Note: matches all Leading match patterns, probably caused by optimization for incremental search.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron