What's a quick and real neat way of....

Enkidu enkidu at cliffp.com
Wed Nov 6 03:09:19 CST 2002


Thanks Piers, I like the way that you avoid the use of $1, $2. I
didn't know you could do that, but then I am a beginner...

Cheers,

Cliff

On Wed, 6 Nov 2002 06:55:54 +0000, you wrote:

>
>just a little tweaking - but there is mtowtdi....
>
> my ($abcd, $thisisabcd) = $var =~ /.*\/([^\/]*)\.jpg[,\s]+(.*)$/;
>
>Cheers.
>
>On Wed, Nov 06, 2002 at 04:59:25PM +1300, Enkidu wrote:
>> .....extracting the abcd and the string "This is abcd" from the
>> following:
>> 
>> $var = "blah/blah/blah/abcd.jpg, This is abcd" ;
>> 
>> What I've come up with so far is:
>> 
>> $var = /.*\/(.*).jpg,(.*)$/ ;
>> 
>> Of course, I'm going to try it out when I get a chance, but what are
>> my chances of success? abcd varies as does the string.
>> 
>> Cheers,
>> 
>> Clif
>> --  
>> 
>> The Nats held a Party and no one came.

--  

The Nats held a Party and no one came.



More information about the Wellington-pm mailing list