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
1 answer
No rows returned by REGEXP_LIKE
I have the following expression that matches the string listed when I test it using Online Regex Tester (https://regex101.com/).
Expression:…

anteater
- 55
- 1
- 7
1
vote
2 answers
Using a column field in SQL like or regexp operator
I have a query:
Select *
from table
where
field1 LIKE '%12345%' (12345 being a column value : field2) *Works*
I want to use a column field value in the LIKE operator instead of hardcoding.
Tried using concat:
where field1 LIKE…

Neha
- 233
- 1
- 3
- 11
1
vote
2 answers
plsql oracle prevent the use of special characters in the 2nd char of string
create or replace function MyFunction(v_FileName in varchar2)
I want to prevent the use of special characters in the 2nd char in v_FileName.
these characters are:
!@#$%^&*()_+=`~[]{}'\|?/><,;:
(i want to allow the use of . and ")
i've tried several…

Dror Cohen
- 125
- 7
1
vote
1 answer
Query that returns rows that start with numeric values in Oracle
i tried to write a query that returns rows that start with numeric values in Oracle.
for example, if the values are "123abc", "abc123", "123abc123", "1a", "a1"
it will returns: "123abc", "123abc123", "1a"
i tried this query:
SELECT *
FROM…

Gil Hadad
- 307
- 1
- 4
- 12
1
vote
2 answers
like and regexp_like
For like we have %. for ex: if we give ad% it ll fetch all the records which starts with ad but i should use regexp_like. for regexp_like what can be used so that it acts as % for like. i cant use ^ad because from UI we ll give something like ad* to…

Alén
- 125
- 2
- 9
1
vote
1 answer
Oracle Regexp_like using AND clause
I'm looking to find all occurrences of "Dr. Jones" in a name field using regexp_like. I can do the OR (all names with DR or JONES in it) but I need both names to be present in the field.
Is there a simple way to do this with regexp_like without…

user4893573
- 13
- 4
1
vote
1 answer
Oracle SQL - Get rows with values in IP address format (dotted quad)
I have a table which has SOURCEIP and DESTINATIONIP columns, and their data type is VARCHAR2. A value in these columns is either an IP address in dotted quad format, or an encrypted anonymous address, which in this case it can be a random string of…

GabeL
- 655
- 9
- 24
0
votes
0 answers
DB2 Regexp_Like in Where clause using a parameter
Our site just switched ERP and the new one is based on db2. In Oracle with our past ERP I could use regexp_like(last_name, || '^(' || replace(replace('&LastName',' ',''),',','|') || ')' ). If the parameter &LastName was left blank, every row would…

Tim R
- 1
- 1
0
votes
1 answer
Regular expression for finding words containing the root and excluding some words containing the same root on Python3
Advice on how to write
took the root "aero", but
with the exception of "aerosol", "aerob"?
(aero) -- Finds the group of a character in a given order.
[^aerosol]|[^aerob] - Excludes words containing combinations of letters "aerosol", "aerob"?

Yaroslav
- 87
- 2
- 10
0
votes
2 answers
Redshift table joins using Similar To
I have this query that runs in Redshift:
Select A.*
From TableA A
join TableB B
on A.Col like B.Pattern
Where the Pattern column in TableB looks like:
('%foo%', '%bar%', ...)
TableB has hundreds of pattern rules and is used in several locations…

JimmyBuffet_Express
- 290
- 5
- 19
0
votes
3 answers
Square bracket in regexp_replace pattern
I want to use REGEXP_REPLACE with this pattern. but I don't know how to add square bracket in square bracket. I try to put escape character but i did not work. in this screenshot i want to also keep the [XXX] these square bracket. I need to add this…

guray
- 1
- 2
0
votes
2 answers
Regexp to parse string into two separate fields based on the last characters in Oracle SQL
I'm working on the ETL for a warehouse management system and I've come across a warehouse location map that's all over the place in terms of naming conventions so my usual method of parsing the warehouse location into warehouse location and…

Tazdeviloo6
- 1
- 1
0
votes
0 answers
REGEXP_SIMILAR in Teradata
I am trying to take out names from a table where name does not contain characters or numbers.
Name Flag
Abc 0
124 0
£% 1
AB÷ 0
17 0
*& 1
What function to be used in Teradata to achieve the desired result?
Best,

Leon35
- 25
- 4
0
votes
1 answer
Database (Postgres) indexing columns containing regex patterns
Consider a table that stores regular expression patters.
One could query such table passing a given text for records containing patters which match given text.
This can be achieved using inverse regexp match operator ~ (by inverse I mean that text…

Sebastian Widz
- 1,962
- 4
- 26
- 45
0
votes
1 answer
Regexp pattern for special characters
I have the data in the format like
Input:
Code_1
FAB
?
USP BEN,
.
-
,
Output:
Code_1
FAB
IP BEN,
I need to exclude only the value which have length as 1 and and are special characters
I am using…

Nidhi Dugar
- 1
- 1