Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regex problem

Status
Not open for further replies.

NetworkGhost

IS-IT--Management
Apr 12, 2005
1,324
US
Hi all. Got a problem with my regex Trying to match the beginning and end of a word so I dont break words such as breakfast if I was looking for just break.

Here is the line:

set newword [exec echo "$newword | sed "s/\b$redword\b//"]

using TCL. The error Im getting is:

extra characters after close-quote.

Is \b incorrect for matching in TCL?

 
Perhaps this ?
set newword [exec echo "$newword[!]"[/!] | sed "s/\b$redword\b//"]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top