Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle Regex_Replace Patter Help

Status
Not open for further replies.

BG12424

Programmer
Jun 4, 2002
717
US
I am trying to perform a regular expression to yield the following results:

would return:
company1.com are the companies

using Oracle's regexp_replace function, but I'm struggling with the pattern syntax. Can anyone get me on the right track? I've been tackling this for quite a bit and struggling on how to structure it. I've been to the following sites for reference too. See below for the requirements.


Rules for pattern:
1. Allows numbers and letters (a-zA-Z0-9)
2. Allows spaces (\s)
3. Allows Ampersands (&)
4. Allows Period (.), but only when it's followed by a space or end of line
5. Hyphens (-) and Forward Slashes (/) are to be replaced with spaces

select regexp_replace('company1.com companies','<need help here>','') as dummy from dual;

Thanks so much in advance.

regards,
Brian


regards,
Brian

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top