Oracle function similar to the LIKE condition, but REGEXP_LIKE performs regular expression pattern matching. See also REGEXP_INSTR, REGEXP_REPLACE, REGEXP_SUBSTR and REGEXP_COUNT for other functions extended to use regular expressions.
Questions tagged [regexp-like]
199 questions
1
vote
3 answers
Oracle SQL - REGEXP_LIKE contains characters other than string 'NA'
I would like to create a query where I select all records which contain characters that are a-z or A-Z,not allowed string 'NA'
select *
from tz_customers c
where REGEXP_LIKE(c.customercode,'^NA');
REGEXP_LIKE allow all characters other STRING…

aishwarya m
- 19
- 3
1
vote
2 answers
Regexp_Like to Validate Uppercase Characters [A-Z] and Numbers [0-9] Only
I would like a query using regexp_like within Oracle's SQL which only validates uppercase characters [A-Z] and numbers [0-9]
SELECT *
FROM dual
WHERE REGEXP_LIKE('AAAA1111', '[A-Z, 0-9]')

Eduardo Ferrreira
- 11
- 1
- 2
1
vote
2 answers
Oracle REGEXP_LIKE find vertical tab 0xb character
Trying to find a vertical tab character in a CLOB field. Using regexp_like which doesn't support entry of hex characters.
so this is not valid
and REGEXP_LIKE(,'[\xB]','i')
Posix entries don't seem to help as :cntl: includes items like carriage…

Genhob
- 13
- 3
1
vote
2 answers
Using Regular expression to replace where clause in select statement
Basically I would like to replace the where clause from the below select statement using regex. (here there are three condition; 1. Owner name 2. table to be included 3. table to be excluded)
SELECT *
FROM all_tables
WHERE owner = 'XXXXXXXX'
AND…

user10914967
- 41
- 6
1
vote
1 answer
Oracle: sort the results of a regexp_like expression
I have a table containing the following values:
Org Role
---- ---------
XX Role2
XXX Role3
XXXX Role4
null RoleDefault
I need a query accepting a parameter that would give me the best match using a regexp_like in the…

I. D.
- 25
- 3
1
vote
1 answer
regexp_like that mirrors contains near
I'm trying to speed up a query that uses Contains Near with one that uses regexp_like. The initial Contains Near query takes about 45 minutes to run. Clob Column holds large "documents" and is domain indexed.
Initial query:
SELECT column1
FROM…

Jennifer Crosby
- 185
- 1
- 1
- 14
1
vote
1 answer
Bad performance with regexp_like
As title, I'm using the Regexp_like in my oracle SQL queries, but the performance very bad.
I have the following code:
SELECT ID, Name, Department, PhoneNumber, Address
FROM DPT.DP_vEmployee --vEmployee is a view
WHERE ID = :p_ID
AND…

Mr. Falcon
- 33
- 1
- 4
1
vote
3 answers
Why doesn't this regexp_like does not get the results I want
I'm trying the following regexp_like for a bigger query, it does not work, what am i doing wrong?
with xx as
(select '333-22-234223' as a
from dual)
select xx.a
from xx
where
regexp_like(xx.a,'^[:digit:]{3}-[:digit:]{2}-[:digit:]{6}$');

Zeus
- 6,386
- 6
- 54
- 89
1
vote
0 answers
how to set parameters into regexp_like in jpa
I have a query statement like this:
@Query(value =
"select t.pt_note, t.tracking_no" +
" from T_EC_PURCHASE t" +
" where regexp_like(t.pt_note," +
" '^(.*[^[:digit:]]+)?(?1)([^[:digit:]]+.*)?$'," +
" …

xmcx
- 283
- 3
- 18
1
vote
2 answers
Oracle SQL -Find strings that have a character from ASCII 0 to ASCII 32 and above ASCII 128
There are some entries in my table which have non printing characters. I tried to write a simple script to execute on Oracle DB-
select column from table where regexp_like(column,'([[:cntrl:]]+)');
But this even matched strings with multiple…

Prateek Narendra
- 1,837
- 5
- 38
- 67
1
vote
1 answer
How to display only matched items using JOIN
Can someone help me to make SQL (ORACLE) query more flexible using such conditions?
There are 2 tables:
Table 1
CodeA Year
1112-999 2017
1113-999 2017
Table 2
CodeB Year
1114-111 2017
1115-111 2018
Then run this…

Vladimir
- 62
- 1
- 7
1
vote
2 answers
How can i parse html description meta with classic asp xmlhttp
i have using classic code with parse html desctiption meta is:
Html exaple:
Parse Code:
Baslangic = InStr(1,sdata,"

B. Mert
- 19
- 5
1
vote
2 answers
Postgresql regexp_substring
I have a text as
Revision:3336179e1ebaa646cf281b7fb9ff36d1b23ce710$ modified $RevDate:10-04-2017 11:43:47$ by $Author:admin
Could you help me out with writing sql query that would get the first 6 chars of revision (333617) and date of RevDate…

Vad Boro
- 77
- 10
1
vote
2 answers
To check if specified pattern is repeating through the entire length of string
I am trying to match a pattern which is like '12345@5.6;12345@45;12345@0.5'.I am trying to Oracle(11g) REGEXP_LIKE function to do that.
Here is my code-
SET SERVEROUTPUT ON;
Begin
if regexp_like(…

Teja duggirala
- 63
- 6
1
vote
1 answer
Equivalency of RLIKE/REGEXP and LIKE - matching whole string vs. arbitrary substring
I have two queries.
SELECT count(AlbumID)
FROM album
WHERE albumname like '%[%]';
Result: 15733
SELECT count(AlbumName)
FROM album
WHERE AlbumName RLIKE '.*\\[.*\\]';
Result: 15740
So as you can see like returns 7 elements less than rlike.…

Mike
- 43
- 1
- 6