aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/re.erl
AgeCommit message (Collapse)Author
2010-01-27Refactor out repeated block in re moduleRory Byrne
2010-01-27Fix re:replace/4 to handle unicode charlist Replacement argumentRory Byrne
A bug in re:replace/4 causes a badarg exception to be thrown when the Replacement argument is a charlist containing non-ascii codepoints. The problem is that the code incorrectly assumes that the Replacement text is iodata() and calls iolist_to_binary/1 on it. This patch fixes it to obey the 'unicode' option and handle charlist() Replacement arguments correctly.
2010-01-27Fix re:replace/4 to handle binary unicode output when nothing replacedRory Byrne
A bug with re:replace/4 causes an exception when: (a) it's given a unicode charlist as input; (b) it's set to {return,binary}; and (c) it finds nothing to replace. The problem is: when re:replace/4 does not find anything to replace in its Subject input, it calls iolist_to_binary on this data. This fails if the original input is a charlist with non-ascii codepoints.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP