Wednesday, September 27, 2006

Useful article on regex in Oracle 10g

cd has written an introductory article on regular expressions in the 10g database. As he doesn't have a blog (imagine!) he has posted it in the OTN PL/SQL forum. In this first article cd shows how we can use Oracle's regular expressions to determine whether a string contains a valid number.

For those who don't know, regular expressions are a way of searching text for patterns rather than literal matchings. It's a cool way of manipulating large amounts of text, including .CSV files and programs. I'll just mention a little utility I have found very useful: the Regex Coach. This nifty piece of freeware (written in Lisp!) provides us with a sandbox in which we can test regular expressions against a target piece of text to see what they will find. It handles replace too. Very useful if you are just starting to find your way around regex. Check it out.

Regex is a topic big enough for a whole book. The book I have found useful is the Mastering Regular Expressions) by Jeffrey E.F. Friedl and published by O'Reilly. Even though reading it does make me think I ought to know more about perl than I actually do.

Update


cd has subsequently published two further articles about Regular Expressions in the OTN forums:
Part Two deals with testing Regular Expressions.
Part Three looks at complex formats such as IP addresses and discusses the 10gR2 enhancements.

3 Comments:

Blogger ebrian said...

This comment has been removed by a blog administrator.

28 September 2006 08:29:00 GMT-7  
Blogger ebrian said...

Another very useful site is http://www.regular-expressions.info/. They actually offer a regex tutorial book for relatively cheap ($19.99), not to mention the tool they designed called Regexbuddy. Both could make learning regular expressions much easier.

http://regexlib.com/RETester.aspx also offers an online regular expression tester.

28 September 2006 08:35:00 GMT-7  
Anonymous Anonymous said...

There is also the regulator which is freeware @
http://sourceforge.net/projects/regulator/

and http://sharptoolbox.com/categories/regular-expressions

29 September 2006 02:13:00 GMT-7  

Post a Comment

<< Home