Lex Thoonen wrote:
Hi,
I'm trying to do this:
in the original text is this:
((se-HomePage|Svenska))
I want to leave it at just:
Svenska
So I tried this:
$row[3] =~ s|\(\(.*?\|(.*?)\)\)|$1|g;
but somehow after substituting it now shows:
((se-HomePage|Svenska
I don't get it.
$ perl -le
Lex Thoonen wrote:
> Hi,
>
> I'm trying to do this:
>
> in the original text is this:
>
> ((se-HomePage|Svenska))
>
> I want to leave it at just:
>
> Svenska
>
> So I tried this:
>
> $row[3] =~ s|\(\(.*?\|(.*?)\)\)|$1|g;
>
> but somehow after substituting it now shows:
>
> ((se-HomePage|Sv
Hi,
I'm trying to do this:
in the original text is this:
((se-HomePage|Svenska))
I want to leave it at just:
Svenska
So I tried this:
$row[3] =~ s|\(\(.*?\|(.*?)\)\)|$1|g;
but somehow after substituting it now shows:
((se-HomePage|Svenska
I don't get it.
Someone here?
Thanks!
--
Lex
On Feb 7, Stuart Clark said:
>How do I match a pattern that starts with a 4 and has 16 numbers in it.
>
>I try /^4\d{16}/;
That's quite vague. Do you mean the string must start with a 4 and
consist ONLY of 16 digits?
/^4\d{15}$/
>Also how do I match a 16 digit number that starts with eith
On Thu, Feb 07, 2002 at 12:17:42PM +, 'Perl wrote:
>
> /^(6565\d{12})|(555[10]00\d{10})/
>
> Perhaps..
>
> not tested mind.
evidently..
/^(6565\d{12})|(555[10]\d{12})/
will manage numbers in the range 555000-555199, not ideal
/^((6565\d{2})|(555(0\d{2})|(100))\d{10})/
will manage the
On Thu, Feb 07, 2002 at 11:10:14PM +1100, Stuart wrote:
> How do I match a pattern that starts with a 4 and has 16 numbers in it.
>
> I try /^4\d{16}/;
If it consists of 16 numbers try:
/^4\d{15}/;
> Also how do I match a 16 digit number that starts with either 6565 or
> starts with a number
How do I match a pattern that starts with a 4 and has 16 numbers in it.
I try /^4\d{16}/;
Also how do I match a 16 digit number that starts with either 6565 or
starts with a number in the range of 555000-555100
/(^6565(\d{16})|^{555000-555100}(\d{16}))/
From: "Quelance" <[EMAIL PROTECTED]>
> replace any matched spaces with
> replace a new line with
>
>
> while() {
> s/\s/ /; #replace spaces with
> s/\n/\n/; #replace newlines with
> print $_;
> print
On Nov 26, Quelance said:
>replace any matched spaces with
>replace a new line with
Um, newline is a space.
>while() {
> s/\s/ /; #replace spaces with
> s/\n/\n/; #replace newlines with
> print $_;
> print OUTFILE $_;
>}
You probably want to change s/\s/ / to s/[ \t]/ /g. That do
I've been avoiding regular expression for quite some time because they are eVil but I
have no choice anymore :) Ok, as a warm up script I'm trying to get this working:
replace any matched spaces with
replace a new line with
while() {
s/\s/ /; #replace spaces with
10 matches
Mail list logo