Hi guys
I want to match whole words in a var ($CHECK_CODE)
Matching the string 'is' in the following
"This is a question"
I want to match the 'is' but not the 'i' and 's' in the word 'this'.
My reference book suggests the following but it matches every instance of 'i' and 's' together.
if($CHECK_CODE =~ /(\b$WHAT\b)/){
........ process
}
Where am I going wrong?
thnx
Keith
I want to match whole words in a var ($CHECK_CODE)
Matching the string 'is' in the following
"This is a question"
I want to match the 'is' but not the 'i' and 's' in the word 'this'.
My reference book suggests the following but it matches every instance of 'i' and 's' together.
if($CHECK_CODE =~ /(\b$WHAT\b)/){
........ process
}
Where am I going wrong?
thnx
Keith