Hi,
> I have some text here that I have placed in a string. I want to be able
> to extract words between text of my choice. For example in the
> string...
>
> $string = "Hello world In: crud all Your.";
>
> ($mytext) = $string =~ /In:(.*)Your/;
>
> The above works fine but how can I tell my re
search on google or perlre on
"perl greedy regular expressions" for more info.
-Original Message-
From: Daniel Falkenberg
To: Timothy Johnson
Cc: [EMAIL PROTECTED]
Sent: 3/10/02 4:05 PM
Subject: RE: Finding words between words...
Hello all,
I have some text here that I have p
Hello all,
I have some text here that I have placed in a string. I want to be able
to extract words between text of my choice. For example in the
string...
$string = "Hello world In: crud all Your.";
($mytext) = $string =~ /In:(.*)Your/;
The above works fine but how can I tell my regex to st
That makes sense. Thanks.
-Original Message-
From: Jason Larson [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 08, 2002 8:53 AM
To: [EMAIL PROTECTED]; Timothy Johnson
Cc: 'Daniel Falkenberg '; [EMAIL PROTECTED]
Subject: RE: Finding words between words...
> -Ori
> -Original Message-
> From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
> Cc: 'Daniel Falkenberg '; [EMAIL PROTECTED]
> Subject: RE: Finding words between words...
>
>
> On Mar 7, Timothy Johnson said:
>
> >From: Jeff '
On Mar 7, Timothy Johnson said:
>From: Jeff 'japhy' Pinyan
>
>> ($btwn) = $str =~ /In:(.*)Your/;
>
>Out of curiosity, what happens if you leave off the parentheses on $btwn?
You try it. ;) I suggest you read "'List' is a Four-Letter Word", which
you can find at
http://www.pobox.com/~japhy/a
riginal Message-
> From: Jeff 'japhy' Pinyan
> To: Daniel Falkenberg
> Cc: Timothy Johnson; [EMAIL PROTECTED]
> Sent: 3/7/02 10:07 PM
> Subject: RE: Finding words between words...
>
> On Mar 8, Daniel Falkenberg said:
>
> >That is very similar to what I am l
Out of curiosity, what happens if you leave off the parentheses on $btwn?
-Original Message-
From: Jeff 'japhy' Pinyan
To: Daniel Falkenberg
Cc: Timothy Johnson; [EMAIL PROTECTED]
Sent: 3/7/02 10:07 PM
Subject: RE: Finding words between words...
On Mar 8, Daniel Falke
On Mar 8, Daniel Falkenberg said:
>That is very similar to what I am looking at doing. The only problem is
>I don't want to replace anything in between In: and Your; I just want
>to extract anything between In: and Your and store it as a variable.
($btwn) = $str =~ /In:(.*)Your/;
--
Jeff "
ailto:[EMAIL PROTECTED]]
Sent: Friday, 8 March 2002 11:44 AM
To: Daniel Falkenberg; [EMAIL PROTECTED]
Subject: RE: Finding words between words...
I think this will do what you're asking, but I can't test it.
$line =~ s/In:(.*)Your/In:($newstring)Your/;
# substitute In: followed b
lto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 2:55 PM
To: [EMAIL PROTECTED]
Subject: Finding words between words...
Hey all,
Does any one know how I would go about finding everything between the
words of...
In: Your?
So if I have a sentance with the following...
Hello all this In: Am
Hey all,
Does any one know how I would go about finding everything between the
words of...
In: Your?
So if I have a sentance with the following...
Hello all this In: America (New York) Your
So is there some perl code that will extract America (New York). Keep
in mind tha t everything betwee
12 matches
Mail list logo