in reply to Re: Regex to detect file name
in thread Regex to detect file name

The Perl regex "shortcut" for A-Za-z0-9 is "\w".
Yes, this shortcut is probably good enough for the case in point. But, without wanting to nitpick, let me just add that \w also matches the underscore ( _). This would be anecdotic in most cases, but it seems that the OP does not want the string to start with an underscore.

Replies are listed 'Best First'.
Re^3: Regex to detect file name
by Anonymous Monk on Jul 05, 2018 at 21:36 UTC
    and unicode
      and unicode
      yes, indeed. ++