Javeed SAR wrote:
> 
> I have a statement as follows;
> I need to split them into 3 parts;
> 
> * test_merge1          \\blrk35ed\views\test_merge1.vws
> 
> 
> LIke this:
> $var1 should have *
> $var2 should have test_merge1
> $var3 should have  \\blrk35ed\views\test_merge1.vws
> 
> 
> 
> TIA
> 
> Jav
> 
> 
> 

how about

$foo = '* test_merge1         \\blrk35ed\views\test_merge1.vws';
$foo =~ m/^(\*)\s+(\w+)\s+(\\.*)$/;

$1,$2,$3 are special variables. they equal whatever is matched between 
each set of () successivly.

$1 will be *
$2 will be test_merge1
$3 will be \blrk35ed\views\test_merge1.vws

Note, if you want $3 to have two \\ you will need to add one like this:

my $tmp = $3;
$tmp = "\\$tmp";

or just add another \ to your string .. \\\blrk35ed\views\test_merge1.vws

Hope that works for ya,
Thanatos

privided ofcourse that the spaces are actually spaces and not tabs .. if 
they are tabs, replace \s+ with \t+



Thanatos


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to