Jacob Carpenter <jcarpenter@libronix.com> wrote: > Abigail, my apologies, I did mean string, instead of expr. I apparently > tried to correct this ambiguity by stating "Subexpr should be a ... string," > failing to realize my terminology error. My bad. Okay, so subexpr is a string, not a regex. That's what I was assuming. > I think the return value of &replace_mid('aaa', 'a+', 'B') should be 'B', > but that's just my humble opinion. How would one handle true expressions, > instead of mere strings? Now you're contradicting yourself. If subexpr is a string, then replace_mid('aaa', 'a+', 'B') is 'aaa' (or maybe undef), since 'a+' doesn't appear in 'aaa'. But if you've changed your mind since the previous paragraph and subexpr is a regex after all, then you're going to have to define what "nearest the middle" means a little better. -- Keith C. Ivey <kcivey@cpcug.org> Washington, DC ==== Want to unsubscribe from Fun With Perl? Well, if you insist... ==== Send email to <fwp-request@technofile.org> with message _body_ ==== unsubscribe