rickysarraf / foxreplace

Automatically exported from code.google.com/p/foxreplace
0 stars 0 forks source link

Regex does not match start position in line with "^blabla" #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a regex substitution for word "TODO" on first position in a line.
Regex: ^TODO  Replace: BlaFasel
2. Edit a TWiki page (normal textbox), write the word TODO in a single line
3. Hit F2 to apply the substitutions

What is the expected output? What do you see instead?
The substitution should replace the word TODO at the first position of a
line with the string "BlaFasel". But nothing happens.

What version of the product are you using? On what operating system?
0.12.2   Ubunutu 

Please provide any additional information below.
It seems as if the regex interpreter does not know the syntax for beginning
of aline.

Original issue reported on code.google.com by i...@martinheinemann.net on 27 Apr 2010 at 7:37

GoogleCodeExporter commented 9 years ago
I can't try in TWiki, but in normal textboxes and textareas it works perfectly. 
Does
it work with other examples?

Original comment by marc.r...@gmail.com on 27 Apr 2010 at 10:30

GoogleCodeExporter commented 9 years ago
Caret (ie start of line) does not work when applied to this very page.
Marc, looking at source code for this web page I can see your response begins 
on a new line. So try the regex
^I can't try in TWiki
and attempt to replace it with whatever. Doesn't work.

Original comment by sqgl2...@gmail.com on 16 Dec 2012 at 9:21

GoogleCodeExporter commented 9 years ago
Your example does work for me, MystaSquiggle. Are you sure you have tried it 
correctly?

BTW I'm now thinking that the reporter meant to replace TODO at the start of a 
line, even if it was in the middle of a block of text. In that case it doesn't 
work because I'm using multiline matching, and maybe an option would be needed 
to not use multiline matching.

Original comment by marc.r...@gmail.com on 17 Dec 2012 at 4:24

GoogleCodeExporter commented 9 years ago
Am sure. See attached screenshots.
My FireFox is v12.0

PS It is an awesome plugin otherwise.

Original comment by sqgl2...@gmail.com on 17 Dec 2012 at 4:38

Attachments:

GoogleCodeExporter commented 9 years ago
Ok, in your case it doesn't work because "Replace HTML" is checked, so that, as 
I use multiline matching, the caret matches only the beginning of the text. It 
works without "Replace HTML" because then it's in the beginning of a block of 
text. I'll add an option to choose between multiline matching or not so it can 
suit all preferences.

Original comment by marc.r...@gmail.com on 18 Dec 2012 at 10:18

GoogleCodeExporter commented 9 years ago
I have created issue 95 to track progress on the multiline matching option.

Original comment by marc.r...@gmail.com on 19 Dec 2012 at 11:31

GoogleCodeExporter commented 9 years ago
Sorry, I was wrong: this happens because multiline matching is NOT enabled.

Original comment by marc.r...@gmail.com on 23 Dec 2012 at 1:39