Hi, Andrea, :)
On Wed, 12 Sep 2001, Andrea Holstein wrote:
> Jason Tiller wrote:
> > # Find the string bounded by "<select " and "/select>". The '.+?'
> > # finds all characters but isn't greedy; ".+" would match all of the
> > # characters between the first "<select " and the *last* "/select>".
> > # Store this match as $1.
> > while( $text =~ /(<select .+?\/select>)/ )
> > { # Use the backreference $1, replacing the matched string with "!x!".
> > $text =~ s/$1/!x!/;
> > }
> >
> > # Print out the modified string.
> > print "$text\n";
> It should be a little bit easier:
> Try $text =~ s{<select .+?/select}
> {!x!}gs;
> print $text,"\n";
Thank you! I didn't see the "s" option to the substitution operator.
This is a lot simpler and more clear. I appreciate your help!
---Jason
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]