in reply to Re: regex die?
in thread regex die?

There's no need to for /\S+, however. Better to simply .+?

Replies are listed 'Best First'.
Re^3: regex die?
by johngg (Canon) on Mar 19, 2006 at 23:51 UTC
    Six of one, a half dozen of the other unless /path/to/file contains spaces. It easily could, of course, but I mainly work on Unix-like systems so it is a bit of a blind spot with me :-)

    Cheers

    JohnGG

      OP did include a space in his match set and also \, both of which are a bit of a hint. :)

      I was under the impression the *nix could handle spaces in directories/file names in any case - it's just that because no one much uses them, *nix applications are even worse at being robust against spaces than Windows applications are.

      /me puts his stiring stick back in the corner. :)


      DWIM is Perl's answer to Gödel
      Alas, paths come with spaces even on unix.
        They can come with all sorts of interesting characters, even non-printing ones which makes the output of ls interesting. What I mean is, you don't normally create files with spaces when footling around in the shell so it is less likely that you will have a /path/to/script with spaces. You often get paths with spaces on partitions that have been Samba shared to MS Windows boxes, "New Folder" being prevalent :-(

        Cheers,

        JohnGG