Menu

#1445 Search & Replace bug - whole words

v4.0.2
open
nobody
None
5
2008-11-17
2007-07-04
No

Searched for "S.C."

Replace returned changes to:
Ellis Co.
Berks County
Frakes, Willis C.
Princes Georges County
Dasachtach, Constantine I
WILSON, JAMES CAPTAIN
Edwards County
Jenkins, Issachar

-Stephen

Discussion

  • Greg Roach

    Greg Roach - 2007-07-04

    Logged In: YES
    user_id=1466942
    Originator: NO

    In that case, you should have searched on \bS\.C\.\b
    This would add word boundaries and prevent the . from acting as a wildcard.

    I'm joking of course.

    The search/replace is using regular expressions. These are delightfully powerful, in the right hands, but probably confuse far more people than they help.

    As well as a "match whole words only" option, perhaps we could also detect the presence of regexes (e.g. look for ?*+.[]) and ask the user whether they want to do a regex search or a literal search.

     
  • Meliza Amity

    Meliza Amity - 2007-07-04

    Logged In: YES
    user_id=959928
    Originator: NO

    See also 1721511.
    I try to change place full word Turku of Turku, Finland to Vyborg of Vyborg, Finland.
    It works only if I also fill , Finland both in the search and in the replace fields.

    Meliza

     
  • Stephen Arnold

    Stephen Arnold - 2007-07-06

    Logged In: YES
    user_id=1061833
    Originator: YES

    Greg
    Just so you know, the "\bS\.C\.\b" routine in PGV search and replace, returns no found instances and makes no changes.
    Stephen

     
  • Greg Roach

    Greg Roach - 2008-11-17
    • milestone: --> v4.0.2
     

Log in to post a comment.