> | Hello!
> | 
> | If I have this line ROXETTE_PC_SW_R1D08 (locked)
> | and just want to remove the (locked) part from it
> | with an regexp how would that look?
> | 
> | I can do: s/(locked)// that leaves the  pesky () how
> | can I get rid off those?
>
> Try:
> 
>   s/\s+\(locked\)//
> 
> The parens are meta-symbols in regexes and need to be
> escaped if you want to match them. The above will
> additionally make sure that the blanks before (locked)
> are also removed.

Hi,

The input looks something like:

ROXETTE_PC_SW_R1D08 (locked)

you *might* consider just taking the leftmost characters. 
In a regex that'd look like:

my ($symbol) = /^(\w*)/;

Jonathan Paton 

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to