Oracle JDBC regex

Send Snippet To: Save this snippet to Code Collector Pro -- view all phact's snippets
language: Other
license: Other

Code for Snippet:

                
^jdbc:oracle:thin:@((?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}
 
(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))
 
|(?:(?:(?:(?:[A-Z|a-z])(?:[\w|-]){0,61}(?:[\w]?[.]))*)
 
(?:(?:[A-Z|a-z])(?:[\w|-]){0,61}(?:[\w]?))))
 
:([0-9]{1,5}):([A-Z|a-z|_|#|$]{1,8})$
 
Once you have the previous five lines stitched together into one regex, you should be able to match the following example URL's, and break them down into the three groupings:
 
jdbc:oracle:thin:@www.porticosys.com:12345:orcl
jdbc:oracle:thin:@216.3.66.175:1:orclABCD
comments powered by Disqus

Info

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 830
Date Added: 2008-04-28 10:38:37
Last Modified: 0000-00-00 00:00:00

Web Analytics