Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Replaces each occurrence of sPattern in sInput with sReplace. This is done with the
- /// CLR: new RegEx(sPattern, RegexOptions.Multiline).Replace(sInput, sReplace). The result of the replacement is
- /// the return value.
- /// </summary>
- [SqlFunction(IsDeterministic = true)]
- public static SqlString FRegexReplace(string sInput, string sPattern, string sReplace)
- {
- return new Regex(sPattern, RegexOptions.Multiline).Replace(sInput, sReplace);
- }
- /// <summary>
- /// Replaces each occurrence of sPattern in sInput with sReplace. This is done with the
- /// CLR: new RegEx(sPattern, RegexOptions.Multiline).Replace(sInput, sReplace). The result of the replacement is
- /// the return value.
- /// </summary>
- [SqlFunction(IsDeterministic = true)]
- [return: SqlFacet(MaxSize = -1)]
- public static SqlString FRegexReplace([SqlFacet(MaxSize = -1)]string sInput, string sPattern, string sReplace)
- {
- return new Regex(sPattern, RegexOptions.Multiline).Replace(sInput, sReplace);
- }
Add Comment
Please, Sign In to add comment