http://www.perlmonks.org?node_id=178432


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