> Probably many ways of doing it, one may be:
> m/(.*)(matchre)(.*)(matchre)(.*)/
> $1 will contain the first (unmatched) string, $2 the first match, $3
> the next unmatched string, etc.
> length will give you the lengths of the (un)matched strings.
thank you raj,
yes! i can just find length of variable S`. But slows down script. it
takes too much
time to work on 1000s of strings. I have to run this many times a day.
i am trying the following code ... is that ok ....i have to implement it
yet ..
$var1 ="ABCDEFGHSDFD....";
while ($var =~m/ABC/g)
{
printf "ABC is at %d\n", pos($var)-2;
}
how about using this ....
or is there any realy fast way to do it ....
thank you once again ...
gowtham
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help