Sunday, March 30, 2008

xp_regex: Regular Expressions in SQL Server 2000 (CodeProject)

xp_regex: Regular Expressions in SQL Server 2000
This is a SQL Server 2000 Extended Stored Procedure writted in Managed C++. It allows you to use regular expressions in T-SQL.

Regular Expressions are probably the best tool for text parsing. Using Regular Expressions GREATLY simplifies anything for which you would normally use CHARINDEX, PATINDEX, SUBSTRING, STUFF, REPLACE, etc.
xp_regex is an Extended Stored Procedure for SQL Server 2000 written in Managed C++ that lets you use Regular Expressions from T-SQL. In case you’re skeptical about the performance when mixing non-.NET code (in this case SQL Server) and .NET code in the same process, don't be.

xp_regex_match
xp_regex_format
xp_regex_split
xp_regex_replace


Download source - 109 Kb

No comments: