View Single Post
  #54  
Old 02-10-2010, 12:22 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by WhiteDragon View Post
I still think this is a bad idea though.
Matching should return or make accessible the part of the string that was actually matched (probably just offset, length) and all the parenthesised groups.

Replacing should optionally take a function instead of a string that is called with the matched part and groups and returns a replacement string.

Reply With Quote