From: "Shishir K. Singh" <[EMAIL PROTECTED]>
> >How exactly does on pre-compile the regex? I would be interested in
> >seeing this.
>
> >[Jess]
>
> Three cases:
> a) Hardcode - /(\w{5})(something)(\w{5})/
> b) Intepolate variable in the search variable, value remaining
> constant throughout the
4, 2002 5:07 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: matching extracharacters
>Hi all,
>I would like to match a string variable in a longer string retreiveing
>the match plus 5 extra characters at each side of the
>match.
>This what I mean:
>$var = 'something
On Mon, Jun 24, 2002 at 04:55:07PM -0400, Pedro A Reche wrote:
> Hi all,
> I would like to match a string variable in a longer string retreiveing
> the match plus 5 extra characters at each side of the
> match.
> This what I mean:
>
> $var = 'something';
> $line = 'SDFGHAsomethingWDFTsft';
>
How exactly does on pre-compile the regex? I would be interested in seeing
this.
[Jess]
-Original Message-
From: Shishir K. Singh [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 5:07 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: matching extracharacters
>Hi all,
Pedro --
...and then Pedro A Reche said...
%
% Hi all,
% I would like to match a string variable in a longer string retreiveing
% the match plus 5 extra characters at each side of the
% match.
This is pretty popular today.
See the no-subject thread from Richard Adams earlier today, including
@matches = $var =~ m/\w{5}$something\w{5}/g
should work I believe
-
Craig Moynes
[EMAIL PROTECTED]
>Hi all,
>I would like to match a string variable in a longer string retreiveing
>the match plus 5 extra characters at each side of the
>match.
>This what I mean:
>$var = 'something';
>$line = 'SDFGHAsomethingWDFTsft';
>and, I would like to get in a new variable the string
>'DFGHAsomethingWDF