Sharan Basappa wrote:
OTOH, I don't see the point in struggling with Text::Balanced, when all you
need is:
my @extracted = $source =~ /covergroup.+?endgroup/gs;
The example I gave is simple but will become more complex as I keep adding
functionality to it. More complex input is yet to c
> OTOH, I don't see the point in struggling with Text::Balanced, when all you
> need is:
>
> my @extracted = $source =~ /covergroup.+?endgroup/gs;
The example I gave is simple but will become more complex as I keep adding
functionality to it. More complex input is yet to come. Also, I
believe
Sharan Basappa wrote:
On Wed, Apr 23, 2008 at 8:33 PM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
Sharan Basappa wrote:
I have gone through the text-balanced doc and tried few examples
myself.
$text = q{12{abc}12345};
($extracted, $remainder) = extract_tagged($text, '{', '}');
print "$e
On Wed, Apr 23, 2008 at 8:33 PM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
> Sharan Basappa wrote:
>
> > I have gone through the text-balanced doc and tried few examples
> > myself. Looks like I need
> > some help on this module usage and capabilities.
> > Basically the text I am trying to extr
Sharan Basappa wrote:
I have gone through the text-balanced doc and tried few examples
myself. Looks like I need
some help on this module usage and capabilities.
Basically the text I am trying to extract is embedded inside two
tokens (say {}),
but it can occur anywhere in the input text stream. I
On Wed, Apr 16, 2008 at 12:20 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
> Sharan Basappa wrote:
>
> > Gary Stainburn wrote:
> >
> > >
> > > On Monday 14 April 2008 16:35, Sharan Basappa wrote:
> > >
> > >
> > > > I am trying to capture the text between two tokens. These tokens
> > > > alway
Sharan Basappa wrote:
Gary Stainburn wrote:
On Monday 14 April 2008 16:35, Sharan Basappa wrote:
I am trying to capture the text between two tokens. These tokens
always exist in pairs but can occur N times.
I somehow dont get what I want.
$str =~ m/tokena(.*)tokenb/ms;
print $1;
Try
$str =~
The issue is I have not been able to successfully install a local
module so far. I have tried this in the
context of Permute module and gave up after spending couple of days.
My mail with subject "algorithm/permute.pm" is the one I am talking about
Regards,
On Mon
actually I tried this before posting this question. The issue is that
regex stops after first match.
The output is:
name: name1
I did put /g at the end, but results are the same.
Regards
On Mon, Apr 14, 2008 at 9:11 PM, Gary Stainburn
<[EMAIL PROTECTED]> wrote:
> On Monday 14 April 2008 16:35,
008 9:06 PM
To: Perl Beginners
Subject: grabbing text between two tokens
Hi,
I am trying to capture the text between two tokens. These tokens
always exist in pairs but can occur N times.
I somehow dont get what I want.
e.g.
In the example below, I would like to capture text between tokena and
tokenb.
On Mon, Apr 14, 2008 at 7:40 PM, <[EMAIL PROTECTED]> wrote:
> Thanks Gary,
> But some of us may wish to know why $str =~ m/tokena(.*)tokenb/ms; did not
> get all the things between tokena and tokenb into $str?
>
> This is how my mind think:-
> (1) The /s switch means to be able to match across
[EMAIL PROTECTED] wrote:
Gary Stainburn wrote:
On Monday 14 April 2008 16:35, Sharan Basappa wrote:
I am trying to capture the text between two tokens. These tokens
always exist in pairs but can occur N times.
I somehow dont get what I want.
$str =~ m/tokena(.*)tokenb/ms;
print $1;
Try
$str
1 PM
Subject: Re: grabbing text between two tokens
On Monday 14 April 2008 16:35, Sharan Basappa wrote:
Hi,
I am trying to capture the text between two tokens. These tokens
always exist in pairs but can occur N times.
I somehow dont get what I want.
$str =~ m/tokena(.*)tokenb/ms;
print $1;
On Apr 14, 2008, at 11:35, Sharan Basappa wrote:
Hi,
I am trying to capture the text between two tokens. These tokens
always exist in pairs but can occur N times.
I somehow dont get what I want.
snip
You might consider looking at Text::Balanced*.
* http://search.cpan.org/dist/Text-Balanced/l
On Monday 14 April 2008 16:35, Sharan Basappa wrote:
> Hi,
>
> I am trying to capture the text between two tokens. These tokens
> always exist in pairs but can occur N times.
> I somehow dont get what I want.
>
> $str =~ m/tokena(.*)tokenb/ms;
> print $1;
>
Try
$str =~ m/tokena(.*?)tokenb/ms;
The
Hi,
I am trying to capture the text between two tokens. These tokens
always exist in pairs but can occur N times.
I somehow dont get what I want.
e.g.
In the example below, I would like to capture text between tokena and tokenb.
So it should capture name1 and name2.
$str = "tokena
name: name1
t
16 matches
Mail list logo