Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: regex die?

by ayrnieu (Beadle)
on Mar 19, 2006 at 22:31 UTC ( #537816=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://537816]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (1)
As of 2022-01-25 18:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (67 votes). Check out past polls.

    Notices?