#3185 4.3pre16: regex $ not matching the last line of a selection

closed
nobody
5
2008-10-31
2008-10-29
Carlos
No

This is reproducible on 4.3pre16-r19000.

Given the below text:

function make_student_rec(
p_birth_date table.birth_date%type,
p_registration_code table.ests_code%type,
p_registration_date table.ests_date%type
) return student_rec as
v_temp student_rec;
begin
p_birth_date table.birth_date%type,
p_registration_code table.ests_code%type,
p_registration_date table.ests_date%type
end;

Reproduce the issue:
1. Select the 3 lines between 'begin' and 'end'.
2. Press Ctrl-F to bring up the find and replace dialogue.
('regular expressions', 'hypersearch' and 'selection' should be selected.)

3. Search for: p_(\w+) [^\n]+$
4. Replace with: v_temp.$1 := p_$1;
5. Press 'replace all'.

This only matches and replaces the first two lines.
It should match and replace all three lines.

Maybe of interest:
Undo the above changes (so that you have your original text again).
Select the 3 lines between 'begin' and 'end' and also select 'end'.
(So now we have 4 lines selected)

Repeat steps 2-4 from above.

This works, matching and replacing the three lines above 'end'

Discussion

  • Carlos
    Carlos
    2008-10-29

    I think that it is the $ that makes the difference in the search expression.

    If you repeat the above steps, but without the $ inthe search expression, it matches and replaces all 3 lines.

     
  • Carlos
    Carlos
    2008-10-29

    • summary: 4.3pre16: regex not matching the last line of a selection --> 4.3pre16: regex $ not matching the last line of a selection
     
  • I couldn't reproduce this with my build at r13952.

    The reported revision r19000 seems not correct because the current trunk
    is at r13963. Please verify the revision and try another build newer
    than r13908 which is the last fix for regex search.

     
  • Carlos
    Carlos
    2008-10-30

    My fault. You are correct k_satoda. I'm using r13908, must have been thinking of something else when I wrote r19000! I will try the latest.

     
  • Carlos
    Carlos
    2008-10-31

    Checked on r13969. Seems to be fixed. Closing the bug.

     
  • Carlos
    Carlos
    2008-10-31

    • status: open --> closed