Regular expression replace goes beyond selection

grant@T2

Member²
For example replace in.* with => for 10 selected lines ends up replacing more than the 10 selected
 
Last edited:
Yes
*1) start with in a program editor as follows

(pi_curr_lv_day in date,
pi_lv_code in varchar2,
pi_lv_unit in varchar2,
p_employee# in varchar2,
p_job# in varchar2,
pi_calendar in varchar2,
pi_holiday_flag in varchar2,
pi_rdo_flag in varchar2,
pi_convert in varchar2,
pi_booking_id in number,
pb_pos_frac_add in out number,
pb_pos_fraction in out number,
pb_roster in out varchar2,
pb_counter in out number,
pb_holiday_days in out number,
pb_rdo_days in out number,
pb_error# in out number,
po_error_message in out varchar2
,po_day_amount out number -- 16229 ) return number is
,po_roster_hours_booking_rule out boolean -- 16229

*2) select/highlight first 10 rows

*3) use find & replace
- selection scope
- text to find in.*
- replace with =>
- regular expression option checked

*4) 14 lines replaced as follows when expect to be restricted to selection of first 10

(pi_curr_lv_day =>
pi_lv_code =>
pi_lv_unit =>
p_employee# =>
p_job# =>
pi_calendar =>
pi_holiday_flag =>
pi_rdo_flag =>
pi_convert =>
pi_book =>
pb_pos_frac_add =>
pb_pos_fraction =>
pb_roster =>
pb_counter =>
pb_holiday_days in out number,
pb_rdo_days in out number,
pb_error# in out number,
po_error_message in out varchar2
,po_day_amount out number -- 16229 ) return number is
,po_roster_hours_booking_rule out boolean -- 16229
 
Back
Top