Ignore:
Timestamp:
Dec 17, 2002, 2:20:10 PM (16 years ago)
Author:
landonf
Message:

Merge in regex escaping fixes from landonf-1.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r1443 r1450  
    10851085        set options(workpath) ${newworkpath}
    10861086    }
    1087        
    1088     set res [dportsearch ^$portname\$]
     1087
     1088        # Escape regex special characters
     1089        regsub -all "(\\(){1}|(\\)){1}|(\\{1}){1}|(\\+){1}|(\\{1}){1}|(\\{){1}|(\\}){1}|(\\^){1}|(\\$){1}|(\\.){1}|(\\\\){1}" $portname "\\\\&" search_string
     1090
     1091    set res [dportsearch ^$search_string\$]
    10891092    if {[llength $res] < 2} {
    10901093        ui_error "Portfile $portname not found"
Note: See TracChangeset for help on using the changeset viewer.