This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

problem with regsub

Old posts that have not been replied to for several years.
Locked
b
bazn
Voice
Posts: 12
Joined: Sun Jul 04, 2004 11:55 am

problem with regsub

Post by bazn »

hi there i have a proc

Code: Select all

proc highlight_string {strin subject pre past} {
    regsub -all $strin $subject "$pre\\0$past" return
    return $return
}
now it works fine... but it must be exactyl the same characters so if
the variable for this proc is

im.not.shure

and that one which i want to compare with is "Not" it doesn't work, no way to do that it also works with "Not" and not just with the same character "not" ?

hope u understand my english ;)

so long
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

I'm not sure if I understand what you're asking for,
but the syntax for regsub goes as this:

Code: Select all

regsub -all -nocase {find this} $InThisVar {replace it with this} NewVar
Atleast that should take care of your problem with case...
Locked