> -Original Message-
> From: John Edwards [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 27, 2001 8:25 AM
> To: 'GRANATA ROBERTA'; [EMAIL PROTECTED]
> Subject: RE: Delete the first char of a string with one
> pattern matching
>
>
>
On Thu, 27 Sep 2001, GRANATA ROBERTA wrote:
> I have a string for ex. $string ='roberta';
> or $string ='1roby';
You don't need a regular expression to do that. You can use the substr
function instead:
$str2 = substr $string, 1;
This should put everything from position
-0400
Subject: Re: Delete the first char of a string with one pattern matching
On Sep 27, GRANATA ROBERTA said:
>With a regular expression i want to delete the first char of this string.
>Can sombody help me to write it?
Why do you need a regex? It's really not the tool for the task...
On Sep 27, GRANATA ROBERTA said:
>With a regular expression i want to delete the first char of this string.
>Can sombody help me to write it?
Why do you need a regex? It's really not the tool for the task...
$str =~ s/.//s; # removes the first character
I'd suggest using substr(), though:
$string = "1test";
$string =~ s/.//;
print $string;
HTH
John
-Original Message-
From: GRANATA ROBERTA [mailto:[EMAIL PROTECTED]]
Sent: 27 September 2001 14:14
To: [EMAIL PROTECTED]
Subject: Delete the first char of a string with one pattern matching
--- Erhalten von ZBM
--- Erhalten von ZBM.ZAGTA 089/32000-414 27-09-01 14.14
Hi all,
I have a string for ex. $string ='roberta';
or $string ='1roby';
With a regular expression i want to delete the first char of this string.
Can sombody help me to write it?
Thanks in advan