On Nov 18, 2003, at 3:22 PM, Steve Massey wrote:

Hi all

Howdy.


I know this should be easy, but I'm at a loss

I want to match Help

Help     ## match this
Helps    ## not match this

I am using syntax below, but it's not working

$help = "Help";

if ($source =~ /^$help/)

if ($source eq $help) ...


or maybe

if ($source =~ /\b$help\b/) ...

The first matches if $source equals help exactly. The second matches if $source contains the word help, surrounded by word boundaries like spaces.

Hope that helps.

James


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



Reply via email to