On Fri, Nov 21, 2003 at 12:53:17PM -0600, Arnold, Mark D wrote:
> I suppose this should be easy, but I can't seem to figure it out. How
> would I grab the first alphanumeric character of a title (ignoring
> quotes or other punctuation)?

It's been a while since I've coded Perl, but I think this would work:

  $title =~ /^\W*(\w)/;    ## match captures first \w in $1
  if ($1) {
    print "Here's the first alphanum char: $1\n";
  }

The \W might do more than you want--it would match any non-alphanumeric
character, not just punctuation.

Chuck

Reply via email to