Questions tagged [regexp-substr]

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.

353 questions
0
votes
1 answer

Check for a presence of word in string by Oracle REGEXP_SUBSTR

I tried to check the string for presence of specific word by regular expression '\b\b', but it seems that \b anchor doesn't work in REGEXP_SUBSTR: E.g. to check for a word ABC: SELECT REGEXP_SUBSTR ('A, AB, ABC,ABCD', '\bABC\b') FROM…
shaf
  • 45
  • 8
0
votes
3 answers

Retrieve certain number from data set in Oracle 10g

1. <0,0><120.96,2000><241.92,4000><362.88,INF> 2. <0,0><143.64,2000><241.92,4000><362.88,INF> 3. <0,0><125.5,2000><241.92,4000><362.88,INF> 4. <0,0><127.5,2000><241.92,4000><362.88,INF> Above is the data set I have in Oracle 10g. I need output as…
um123
  • 131
  • 1
  • 1
  • 5
0
votes
1 answer

Oracle Query on Regexp_substr

I'm trying to use Regexp_substr to extract the unit no from the Property Field. Below is the query. regexp_substr(PROPERTY,'(#)[^\S]+ ') While some of the results are correct, but others came back like below: #05-08 DOVER PARKVIEW May I know what…
Adrian Tan
  • 33
  • 8
0
votes
2 answers

Oracle split message with regexp_substr

I need to split message: 500 Oracle Parkway.Redwood Shores.*.=13 Now I have a bit worked solution for Substr1/2/4 SELECT '500 Oracle Parkway.Redwood Shores.*.=13' string1, REGEXP_SUBSTR('500 Oracle Parkway.Redwood Shores.*.=13','.[^.]+') …
27P
  • 1,183
  • 16
  • 22
0
votes
0 answers

Oracle11g Regex Non-capturing Groups

Multi-currency REGEXP_SUBSTR Oracle11g First time posting a question here, so I hope I don't muck it up too badly. I created a query that pulls various customer order details including charged price, product list price and the big one, the price…
0
votes
3 answers

REGEXP to insert special characters, not remove

How would i put double quotes around the two fields that are missing it? Would i be able to use like a INSTR/SUBSTR/REPLACE in one statement to accomplish it? string :=…
QuickDrawMcgraw
  • 83
  • 1
  • 3
  • 12
0
votes
1 answer

When I run this query in argos reports I am getting this error of invalid character

select regexp_substr('SMITH,ALLEN,WARD,JONES','[^,]+', 1, level) from dual connect by regexp_substr('SMITH,ALLEN,WARD,JONES', '[^,]+', 1, level) is not null;
0
votes
2 answers

ORACLE:SQL REGEXP_SUBSTR that returns the column value after last backslash(/)

ORACLE:SQL REGEXP_SUBSTR that returns the column value after last backslash(/) example: https://test/test/test/test/getTest/1234 expected value: 1234
dreambigcoder
  • 1,859
  • 4
  • 22
  • 32
0
votes
4 answers

Get subtring from a string in ORACLE

I have this string: 145|567 And i want to extract just the part after the "|" The idea is not using positions because the strings may have different lengths. Expected result: 567 Thank you very much
0
votes
4 answers

how to use regexp_substr

i have call number : TX353 G35 1992 Ref QP141 B151 R4 1956 RM216 M285 K5 1996 T385 C22 1960 Ths LB500 M200 A5 1998 i want to result: TX353 G35 1992 =>TX Ref QP141 B151 R4 1956 =>QP RM216 M285 K5 1996 =>RM T385 C22 1960 …
nopnop
  • 13
  • 2
0
votes
3 answers

Find a substring in Oracle SQL “after first _ (underscore) to start” and “second _ (underscore) to end” using REGEXP_SUBSTR or SUBSTR function

My Input pattern like: WITH data_tab AS ( SELECT '1540_INPUTTER' user_name FROM dual UNION SELECT '1540_RAZZ25_UNKNOWN' FROM dual UNION SELECT '1540_RAKIB17_OS_WIN10' FROM dual ) SELECT REGEXP_SUBSTR(user_name,…………………….....) AS…
Rakib Khan
  • 1
  • 1
  • 5
0
votes
2 answers

ORACLE:SQL REGEXP_SUBSTR that returns the column value after 3rd semicolon and before the pipe whose value starts with D

ORACLE:SQL REGEXP_SUBSTR that returns the column value after 3rd semicolon and before the pipe whose value starts with D example: column value: 'D:5:testps:12345|blah blah/blah' expected value: 12345 regex that would filter values which start with…
dreambigcoder
  • 1,859
  • 4
  • 22
  • 32
0
votes
2 answers

Function to accept string parameter and return substrings usable outside of the function

I want to write a function that accepts an input string, uses REGEXP_SUBSTR to parse that string into up to five substrings, and returns the substrings to the procedure that called the function. CREATE OR REPLACE FUNCTION…
Jake
  • 604
  • 3
  • 9
  • 33
0
votes
1 answer

regexp_substr with LIKE as search condition

Thank you mathguy for your suggestion and assistance. The example you provided is a near perfect description of the issue. That being said I've used and edited your text to help describe this issue: I receive a string that contains comma delimited…
BJC
  • 58
  • 7
0
votes
2 answers

Parse Values with Delimiters Using REGEXP_SUPSTR in Oracle 10g

I have a table called TVL_DETAIL that contains column TVL_CD_LIST. Column TVL_CD_LIST contains three records: TVL_CD_LIST: M1180_Z6827 K5900_Z6828 I2510 I've used the following code in an attempt to return the values only(so excluding the…