ansaurus

tags:

  • regex
  • stored-procedures

views:

457

answers:

1
+3  Q: 

Regular expressions in stored procedures

Can a regular expression be used inside a stored procedure? If it can, how? Can you give some examples of how to do it?

+17  A: 

Generally, yes.

MySQL: http://dev.mysql.com/doc/refman/5.1/en/regexp.html

Oracle: http://www.oracle.com/technology/obe/obe10gdb/develop/regexp/regexp.htm

MS SQL: http://msdn.microsoft.com/en-us/magazine/cc163473.aspx

Some more:

PostgreSQL: http://www.postgresql.org/docs/8.3/static/functions-matching.html

DB2: http://www.ibm.com/developerworks/data/library/techarticle/0301stolze/0301stolze.html

Informix: http://www.ibm.com/developerworks/data/zones/informix/library/techarticle/db%5Fregexp.html

SQL Anywhere: http://iablog.sybase.com/paulley/2009/06/using-regular-expressions-with-sql-anywhere/

o.k.w  2009-10-30 14:13:33

related questions

Passing a commented, multi-line (freespace) regex to preg_match
My regex is matching too much. How do I make it stop?
Using Regex to generate Strings rather than match them
Complexity of Regex substitution
What is the most brilliant regex you've ever used?
RFC calculation in Java need help with algorithm
What did I do wrong here? [Javascript Regex]
How do you use back-references to PCREs in PHP?
Need help writing a regex statement. [PHP]
Regex and unicode
Python Regular Expressions
Question about specific regular expression
Pre-built regular expression patterns or Regex Libraries?
Parsing attributes with regex in Perl
Regex Rejecting matches because of Instr
How do I bind a regular expression to a key combination in emacs?
How do you retrieve selected text using Regex in C#?
Remove Quotes and Commas from a String in MySQL
Regular expression for parsing links from a webpage?
What are good regular expressions?
Why is this regular expression faster?
Learning Regular Expressions
How far should one take e-mail address validation?
How can I get at the matches when using preg_replace in PHP?
Regex: To pull out a sub-string between two tags in a string
The questions, topics and answers come from serverfault.com, stackoverflow.com and superuser.com, and are licensed under the cc-wiki license.
© 2010 Chad Scira / icodeforlove