[oclug][OT] Quick Perl question
en916 at freenet.carleton.ca
Fri Nov 8 16:38:58 EST 2002
Hi, I know this is OT, but I've searched the web and
couldn't find an answer.
I'm new to Perl, and I'm having trouble with a
regular expression. I basically want to match a
word, so I currently have /\b[a-zA-Z]\b/. The
problem is that I want to match any word boundary
*except* a hyphen, so that something like 'hello-'
or '-hello' would not match. The current version
matches because the \b matches on the hyphen.
Can anyone help me?
More information about the OCLUG