View Single Post
Old 12-06-2015, 06:00 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@eschwartz: FWIW (which isn't much) the way I mentally handle this problem is to remind myself that a replacement only occurs if the entire search pattern successfully matches against the source, and that in that case only the matched segment of the source is replaced. I often find myself sticking anchors and .*s in odd places to be sure that the pattern matches the entire source.
chaley is offline   Reply With Quote