In message <[EMAIL PROTECTED]>, Michael Davey - Sun UK Support Engineer
writes:
>I would also like to do...
>
>$grafitto = "fee fie foe foo";
>pos $grafitto = 4; # Skip the fee, start at fie
>while( $grafitto =~ m/e/g ) {
> print pos $grafitto, "\n";
>}
>
>I guess I could get a substring and do work with that,
>adding 4 to all the results.
pmi.setInput("fee fie foe foo");
pmi.setCurrentOffset(4); // or pmi.setBeginOffset(4) depending on what
// you really mean (i.e, how you want ^ to behave).
while(perl.match("m/e/", pmi)) {
System.out.println(pmi.getMatchEndOffset());
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>