[erlang-patches] extended back references in re:replace/3,4
Vance Shipley
vances@REDACTED
Mon Jul 16 09:14:25 CEST 2012
Folks,
I never heard anything further after submitting this patch in April.
I have redone it today using the current maint branch and it is available
here:
https://github.com/vances/otp/commit/2094d07ca0fae8e2d983a4aeaaf2e4db7896edd5
Please let me know what I have to do to see this included in pu.
--
-Vance
On Wed, Apr 04, 2012 at 07:17:29PM +0530, Vance Shipley wrote:
} I created a patch to resolve the use case probem I have with
} the current implementation of re:replace/3,4 with regard to
} using back references on numeric digit strings:
}
} git fetch git://github.com/vances/otp.git re_back_reference
}
} https://github.com/vances/otp/compare/re_back_reference
} https://github.com/vances/otp/compare/re_back_reference
}
} Test cases and updated the documentation are included.
}
} I hope you'll accept it for inclusion in a future release.
}
} --
} -Vance
}
} On Thu, Mar 08, 2012 at 09:28:19PM +0530, Vance Shipley wrote:
} } Is there a syntax supported which allows us to insert a back
} } reference in a replacement followed directly by digits? I
} } haven't found one yet.
} }
} } Eshell V5.9 (abort with ^G)
} } 1> re:replace("012345", "0(...)45", "\\1bcde").
} } [[<<"123">>,<<"bcde">>]]
} } 2> re:replace("012345", "0(...)45", "\\16789").
} } [[<<>>]]
} } 3> re:replace("012345", "0(...)45", "\\g{1}6789").
} } [<<"g{1}6789">>]
} }
} }
} } --
} } -Vance
} } _______________________________________________
} } erlang-questions mailing list
} } erlang-questions@REDACTED
} } http://erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-patches
mailing list