Collections:
Use of Regular Expression in Oracle
How To Use Regular Expression in Pattern Match Conditions in Oracle?
✍: FYIcenter.com
If you have a pattern that is too complex for LIKE to handle, you can use the regular expression pattern patch function: REGEXP_LIKE().
The following script provides you some good examples:
SELECT CASE WHEN REGEXP_LIKE ('FYICenter.com', '.*fyi.*', 'i') THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE SELECT CASE WHEN REGEXP_LIKE ('FYICenter.com', '.*com$', 'i') THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE SELECT CASE WHEN REGEXP_LIKE ('FYICenter.com', '^F.*','i') THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE
2016-10-16, 601👍, 0💬
Popular Posts:
Why I Can Not Enter 0.001 Second in DATETIME values in SQL Server Transact-SQL? If you enter millise...
How To Convert Character Strings into Numeric Values in SQL Server Transact-SQL? Sometimes you need ...
What Are Date and Time Functions in MySQL? MySQL offers a number of functions for date and time valu...
How To Count Duplicated Values in a Column in SQL Server? If you have a column with duplicated value...
Can You Create a View with Data from Multiple Tables in SQL Server? Can You Create a View with Data ...