Oracle function that extends the functionality of the SUBSTR function by allowing searching a string for a regular expression pattern. See also REGEXP_INSTR, REGEXP_REPLACE, REGEXP_LIKE and REGEXP_COUNT for other functions extended to use regular expressions.
Questions tagged [regexp-substr]
353 questions
2
votes
1 answer
How to extract only numerics from string in PostgreSQL 8.0.2 Amazon Redshift
I only want the numeric part of this string column:
identity
student:1234
student:56
student:789
id:driver_license-111-AZ
id:learner_permit-222-NY
So that the output should be:
wanted
1234
56
789
111
222
I am…

puifais
- 738
- 2
- 9
- 20
2
votes
3 answers
How to apply `REGEXP_SUBSTR` to extract specific substring from string?
I have the following string 011/2020-PL00-70-31 (it could slightly different for example 011/2020-PL00-70-3 or 011/2020-PL00-70-310). I need to extract from the string all string before last -. As a result of REGEXP_SUBSTR of 011/2020-PL00-70-310 I…

Davit
- 97
- 7
2
votes
2 answers
REGEXP_SUBSTR - how to get special characters after specific pattern?
I have such a column:
{"abcVersion" : "1.2.3.4", https://klmno.com:5678/def", "xyzVersion" : "6.7.8.9"}
I now would like to get the numbers and . after the pattern xyzVersion" : " in order to get 6.7.8.9 as result.
I tried…

Tobitor
- 1,388
- 1
- 23
- 58
2
votes
2 answers
How can I use the oracle REGEXP_SUBSTR to extract specific json values?
I have some columns in my Oracle database that contains json and to extract it's data in a query, I use REGEXP_SUBSTR.
In the following example, value is a column in the table DOSSIER that contains json. The regex extract the value of the property…

Natty
- 497
- 1
- 11
- 23
2
votes
2 answers
ORACLE REGEXP limitation?
I'm testing oracle REGEXP_SUBSTR function and regexp that works in Python or Web testing tools like https://regex101.com/ doesn't work with…

Antoine Auzillaud
- 21
- 1
2
votes
1 answer
How to Get the details after the space in REGEXP_SUBSTR in oracle 11g
I just want some help in my script. I have a 2 types of values in my data the first one is
first-order, Delivery Date: 04/18/2020 AM, OOS: Find similar item
The other one is
third-order, Delivery Date:04/19/2020 AM, OOS: Find similar item
I…

rash eminem
- 27
- 6
2
votes
2 answers
How to split string by multiple delimiters in flutter?
This looks like a simple question, but I couldn't find any result after google.
I have string tel:090-1234-9876 03-9876-4321 +81-90-1987-3254, I want to split it to tel:, 090-1234-9876, 03-9876-4321 and +81-90-1987-3254, what can I do?

mikezang
- 2,291
- 7
- 32
- 56
2
votes
4 answers
Oracle regexp_substr to extract data
I am trying to extract download and upload speed number from the string, not able to achieve it, please help
Input String: My ADSL 14Mbps/2M speed
Expected output:
Download_speed = 14
Upload_speed = 2
My SQL
SELECT regexp_substr('My ADSL 14Mbps/2M…

user2907940
- 45
- 4
2
votes
3 answers
How to use REGEXP_SUBSTR properly?
Currently in my select statement I have id and value. The value is json which looks like this:
{"layerId":"nameOfLayer","layerParams":{some unnecessary data}
I would like to have in my select id and nameOfLayer so the output would be for…

Eryk Janocha
- 21
- 2
2
votes
3 answers
Return a substring using a regExp [Java]
I need to implement a function that, given as input a filename, returns a substring according to the specifications of a regular expression
Filenames are composed this way, I need to get the string in…

Mattia
- 1,057
- 2
- 17
- 33
2
votes
1 answer
Match only Words in a column with list of words
I have a table with Description where it can have multiple words, I need to compare with a set of words ( set of words are output from another query using LISTAGG function) to check if the word is existing in Description column or not.
For example…

Prakash Kavilapati
- 21
- 2
2
votes
3 answers
Need to remove the exact group of characters
I need to remove all the characters after a particular string (-->).
select
REGEXP_SUBSTR('-->Team Name - Red-->blue', '[^(-->)]+')
from dual;
expected result from the above query is "Team Name - Red". But its returning "Team Name".
Its…

Sharath Tanish
- 51
- 3
2
votes
3 answers
How to use REGEXP_REPLACE to check if a value 'Closed' is present in the string and replace
I have the below condition.
Monday 8:30 a.m. to 6:00 p.m. <.br> Tuesday Closed <.br> Wednesday 8:30 a.m. to 6:00 p.m.
Here Tuesday is Closed. So i need to exclude the below value from the string '<.br>Tuesday Closed' and generate as :
Monday 8:30…

Tedgeor
- 53
- 1
- 5
2
votes
2 answers
Exclude a series of characters in regex via Oracle's REGEXP_SUBSTR
I am trying to use Oracle's REGEXP_SUBSTR to select fields in a string.
Example:
this,,,is,,,an,,,example
Solution:
DECLARE
field1 VARCHAR2(4000);
field2 VARCHAR2(4000);
field3 VARCHAR2(4000);
field4 VARCHAR2(4000);
separator…

Link Marston
- 37
- 1
- 8
2
votes
2 answers
Extract a number from comma separated string using regular expressions in oracle sql
I am trying to fetch a number which starts with 628 in a comma separated string.
Below is what I am using:
SELECT
REGEXP_REPLACE(REGEXP_SUBSTR('62810,5152,,', ',?628[[:alnum:]]+,?'),',','') first,
…

Vijay
- 65,327
- 90
- 227
- 319