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
0
votes
1 answer
Split comma separated column into rows - For Multiple rows
I have to split the declared string delimited by ; into rows as below. It works well if I declare the string and split it. Instead of declaring, I have to select this string from a table and parse it repeatedly. Each row can contain different…

texasnewbie
- 1
- 2
0
votes
1 answer
SQL Regex substr pattern match
Okay, so I've asked the following to programmers i know, and no one could come up with a way to do this.... Please help if you can!
I’m doing a pattern match for hospital procedures, and in this example, it would be matching ¾ words from one concept…

Michael R.
- 1
- 1
0
votes
0 answers
SQL Regexp like pattern match on any combination of words
So I'm working in the perl sql flavor with a regexp_like and need to combine two tables based on pattern matching. One item might be 'Mammogram-bilateral' the other may be 'bilateral mammogram scan' I really need help with matching to get 9 out of…

Michael R.
- 1
- 1
0
votes
1 answer
REGEXP_SUBSTR Oracle | Extract a string between two delimiters
Im trying to extract a name from a column that return a big clob like this one:
{
"idStatus":6,
"atrasoSLA":0.0,
"atrasoSLAStr":"00:00",
"baseReports":false,
"idItemTrabalho":10019,
"portfolio":"Segurança",
…
0
votes
1 answer
Searching for substring "52" in variable value "52/80" doesn't work in TCL
The code I'm using:
set channel 52/80
if {![ regexp { ([0-9]+)\/80 } $channel match cchannel ] } {
puts "Channel regex-ed in \[SLVR\]\[SetAffected_channels\] is: $cchannel\n\n"
}
returns error: can't read "cchannel": no such…

Tanbir
- 63
- 1
- 6
0
votes
2 answers
Limit regexp_substr responses when unwanted characters appear in string (return null responses)
Attempting to limit responses when certain characters appear in the string-
i.e. I want 'The cow went for a walk'
However
1 if within 20 characters the word 'BAD' appears such as the "The BAD mean cow went for a walk" it would return a null…

Lawrence Block
- 71
- 9
0
votes
2 answers
part 2 of limiting regexp_substr expressions
So with assistance the the other day-I have made strides but now challenged with a new issue-
with the code below -I am trying to do two things-
1) With the word car-if it is any other word -i.e. card, cardiac-do not return a false value.
2) If…

Lawrence Block
- 71
- 9
0
votes
1 answer
using regexp_substr to capture all characters between two words (including the front and end of the string
So I have been mostly using regexp_like and not regexp_substr-
but in the strings below
'abc 3/4/16 blah blah 3/7/16 imp 2/8/15 xxx cc2'
'3/10/18 bla bla imp-3/9/17 xfe 334 3/4/13'
I want to capture
imp 2/8/15 xxx cc2
imp-3/9/17 xfe
In…

Lawrence Block
- 71
- 9
0
votes
2 answers
oracle regular expression substring question
I am struggling to come up with a regular expression which extracts everything with the pattern between "abc_" and "&"
Example 1:
Input string: abc_s=facebook&abc_m=social&abc_c=abcd-video&clicks=jfhjkfdjfdjkfh
Output string:…

user1751356
- 565
- 4
- 14
- 33
0
votes
1 answer
Redshift get Word patterns from a String
I have a string in a column 'ABC1,ABC2,WWW1,WWW2,ABC3,WWW3,WWW4,ABC4'
I need to extract words starting with ABC alone . The expected results should be
ABC1,ABC2,ABC3,ABC4
I tried the bellow but didnt work
select…

Sachin Sukumaran
- 707
- 2
- 9
- 25
0
votes
1 answer
Make Distinct Reccuring Value In Text
I have a problem to make distinct in a text. I have a table column separated semi column in my oracle database. It has recurring values and ı want them distinct. For example;
with s (ID, ID_NAME) as (
select 1, 'GEORGE JOHN,GEORGE JOHN,GEORGE…
0
votes
1 answer
How to Shorted Regular Expression
I have a RegExp as below, when I use it in Oracle SQL, I got ORA-12723 error, how can I let it in the shortest format?
WITH test_data ( str ) AS (
SELECT 'This is extension 1234, here is mobile phone: 090-1234-5678 maybe 8+24-98765432. Then…

mikezang
- 2,291
- 7
- 32
- 56
0
votes
2 answers
Sql query with regexp_substr is slow and timing out once more records are inserted in table
I have a table
cbcm(REPORT_NAME varchar2(30), WHERE_CLAUSE varchar2(2000))
insert into cbcm(REPORT_NAME,WHERE_CLAUSE)
values('SE_SUPP2','29786399,29271272,29815958,29821597,29821140,29821791,29850566')
Here WHERE_CLAUSE is having integer(id)…

Subhash Tiwari
- 53
- 1
- 6
0
votes
1 answer
Oracle REGEXP_SUBSTR Look-Ahead and Look-Behind
I am trying to write a regular expression which fetches minimum and maximum of width and length from the given text.
Eg. I have few sample texts as below.
1. S-BARE-w<=1250;L<=4000
2. S-BARE-w<=1250;4000

Debabrata
- 162
- 9
0
votes
1 answer
Separate Strings Between Hypens
I need these characters separated from the following string in oracle sql.
PQ
LAN
RRR
R_RR_RX PQ-LAN-RRR (FYZ)

Amy Steele
- 11