in reply to Regex to detect file name

The Perl regex "shortcut" for A-Za-z0-9 is "\w".

Show a bit more examples and the Monks will help you write an appropriate regex.

Replies are listed 'Best First'.
Re^2: Regex to detect file name
by Laurent_R (Canon) on Jul 05, 2018 at 21:33 UTC
    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.
      and unicode
        and unicode
        yes, indeed. ++