Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Re: Doesn't seem complete

by dreadpiratepeter (Priest)
on Jun 30, 2002 at 23:08 UTC ( #178432=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Doesn't seem complete
in thread Regular expression double grouping negation headache

Once again, you have misunderstood the problem. The string you are passing in will be parsed by the shell as 2 arguments. The first being foo=moo which will properly be parsed as foo => moo. The second being shoo\= coo which will also be properly parsed as shoo\ => coo. In order to embed a space into the tag you need to escape the space, so that the shell will parse it as one argument. Thus making the correct string, foo=moo\ shoo=\ coo
Try the code I posted on the strings and you will see that it works. the limitation is that it can't parse an equal sign in the key, not in the value as you are trying to do.



-pete
"Pain heals. Chicks dig scars. Glory lasts forever."

Replies are listed 'Best First'.
Re: Re: Re: Re: Doesn't seem complete
by tlhf (Scribe) on Jun 30, 2002 at 23:32 UTC
    "the shell"?

    Well, if you're using a shell which breaks up arguments like that, and that you don't want to run your application under different conditions at any point, then yes, it would work. However, a lot of shells don't. Shells break arguments up in a number of different ways. I usually find the simplist way of making sure my app comparatively portable is to join these elements of ARGV back up. I apologies for not making this clearer at the top of my first post in this thread. And I also apologies for making it clearer that I was pointing out the problems of an equals in the value.

    The example you've given would work under the system you have now like that. But I didn't miss the point, I just explained myself badly.

    tlhf
    xxx

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2021-10-22 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (86 votes). Check out past polls.

    Notices?