On Wednesday, Sep 22, 2004, at 08:05 US/Central, Jenda Krynicky wrote:
Which means it's actually much easier than I had you believe:
$s = "sasas dfgfgh asasas asedsase";
while ($s =~ /(?=sas)/g) {
print "pos=",pos($s), " = '",substr($s,pos($s),3),"'\n";
}
Bas
From: Robert Citek <[EMAIL PROTECTED]>
> On Tuesday, Sep 21, 2004, at 17:17 US/Central, Jenda Krynicky wrote:
> >
> > How about this:
> > $s = "sasas dfgfgh asasas asedsase";
> > while ($s =~ /\G.*?(?=sas)./g) {
> > print "pos=",pos($s)-1, " = '",substr($s,pos($s)-1,3),"'\n"
On Tuesday, Sep 21, 2004, at 17:17 US/Central, Jenda Krynicky wrote:
How about this:
$s = "sasas dfgfgh asasas asedsase";
while ($s =~ /\G.*?(?=sas)./g) {
print "pos=",pos($s)-1, " = '",substr($s,pos($s)-1,3),"'\n";
}
Thanks. Seems to work, although I'm stil
From: Robert Citek <[EMAIL PROTECTED]>
> Is there an equivalent for "index" that uses regular expressions
> instead of exact string?
>
> I've been looking at index, pos, m//, and the corresponding "$"
> variables but nothing I've found so far does what I'm looking for.
> Specifically, what I'm t