Hi! I have a new problem 
Imagine (this is only a example, i'd like it was general):
$er = "(a) (b\w*) (b\w*) (c)";
$word = "d a b b c d a b b c d";
while ($word =~ /($er)/g)
{
I want to know how many words are there before second b
}
How can I obtain the pos of ($4)?
Thath is to say, I'd like can get :
"d a b" / "b" / "c d a b b c d" at first iteration
there are 3 words before second "b"
and get
"d a b b c d a b" / "b" / "c d" at second iteration
there are 8 words before "second" "b"
Have you got any idea? Thanks
Imagine (this is only a example, i'd like it was general):
$er = "(a) (b\w*) (b\w*) (c)";
$word = "d a b b c d a b b c d";
while ($word =~ /($er)/g)
{
I want to know how many words are there before second b
}
How can I obtain the pos of ($4)?
Thath is to say, I'd like can get :
"d a b" / "b" / "c d a b b c d" at first iteration
there are 3 words before second "b"
and get
"d a b b c d a b" / "b" / "c d" at second iteration
there are 8 words before "second" "b"
Have you got any idea? Thanks