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
2 answers

Extract part of the string using REGEXP_SUBSTR

I am using the error log table through dbms_errlog.create_error_log for DML operation error's in bulk & returning the ORA_ERR_MESG$ back to the Client. However i need to ignore the error code , so it looks user friendly. Ex: ORA-01400: cannot…
pats4u
  • 177
  • 6
  • 18
0
votes
2 answers

Oracle REGEXP_REPLACE - Replace multiple occurrences of the pattern with a substring

Is it possible to replace multiple occurrences of the pattern with a substring using REGEXP_REPLACE function in Oracle. I tried multiple permutation & combination of the regex expression, but somehow it didn’t work out correctly. Superficially it…
Vishal
  • 198
  • 1
  • 3
  • 11
0
votes
1 answer

regular expression oracle sql

I have a table of people which build from two columns the first one is id and the second one is XML which counties the person details. For example the person XML file can be: First Last
5 Champ de…
Yonatan
  • 9
  • 2
0
votes
2 answers

Sql Oracle: Regexp_substr

I have the following expression: 15-JUL-16,20-JUL-16,20-JUL-16,30-JUL-16 in one of my columns. I successfully used SUBSTR(REGEXP_SUBSTR(base.systemdate, '.+,'), 1, 9) to get 15-JUL-16 (expression until first comma) from the expression. But I can't…
0
votes
2 answers

How to use regex match in string array?

I want to this : When the entered value matches the value of the my array , write the matches value. so this is my code : //my array as the following : var checkNames = (document.getElementById("KPIorCounterList").value.split("\n").map(element =>…
eagle
  • 451
  • 1
  • 7
  • 27
0
votes
3 answers

Extract date from string oracle

I have a column in which a string starts with - 'Chicago, IL, April 20, 2015 — and so on text here'. I want to extract the Date part from this string in Oracle. Any ideas on how to do this. I was able to find something for mm/dd/yyyy like below, but…
user747291
  • 821
  • 3
  • 20
  • 43
0
votes
1 answer

oracle split by comma a quoted string

I have found tons of questions like this, but none of them are 100% suitable for me. i have oracle 11g express I have that string 'abcd,123,,defoifcd,"comma, in string",87765,,,hello' it means normally a comma separates the data, but could be empty…
pillesoft
  • 486
  • 1
  • 6
  • 20
0
votes
2 answers

oracle phone number format reg exp in wrong data

I come here after checking this topic: Regular Expression that includes plus sign and decimal my main problem is the following, I have wrong migrated data that needs fixing. for phone numbers we have some letters and special chars that need to be…
Miguel Costa
  • 627
  • 1
  • 12
  • 30
0
votes
1 answer

Oracle extract json fields using regular expression with oracle regexp_substr

I'm using Oracle query with regular expression and oracle regexp_substr to extract json fields from JSON string. whene I try to get the value of code key it working well and its value, but whene i try to get the value of results key it return…
Osama Jetawe
  • 2,697
  • 6
  • 24
  • 40
0
votes
1 answer

Extract a part of a string using regexp_substr

I am running the following in Oracle sql. I am able to obtain the result I want but would like to understand how to apply the alternative. I want to pull out the name which always starts at the 18th character, but the names and characters after are…
hadoo
  • 213
  • 1
  • 12
0
votes
1 answer

oracle REGEXP_SUBSTR

I've this string: GS24;;5289;TREG;248;LGS242604UG3AS7RWA;;[{"376108228000002801";;1}] and I just want this number: LGS242604 What is the correct REGEXP_SUBSTR expression? thx for helping!
TobiasWeinzierl
  • 109
  • 1
  • 7
0
votes
2 answers

Regexp function in ODI 11g

I have a data in a table as ID Service Amount 1 Mpesa,Credit,topup,App 2000 2 Credit,topup,App 1000 3 Topup,App 500 I need the output as ID Service Amount 1 Mpesa 2000 1 Credit 2000 1 topup …
0
votes
0 answers

Speed up creating a list of PL/SQL function/procedure dependencies

We are creating a list of functions and procedures used when executing a restricted version of a piece of software in PL/SQL. Our process is slow though, and we want to find a faster way of finding function or procedure calls made within a given…
F Greeny
  • 13
  • 5
0
votes
1 answer

oracle regexp_substr for random occurrence of a pattern

Hi I need to find a pattern which randomly occur in a string in any order The values in a column may be like these 'k=34,n=WER-RTN,l=hy33,z=device' 'k=34,l=hy33,z=device,n=WER-RTN' 'n=WER-RTN,l=hy33,z=device,k=34' I need to pick up the value…
0
votes
2 answers

Converting to number from string with special characters

I have a input column with below values. 1.2% 111.00$ $100.00 aa ss Output expected 1.2 111.00 100.00 null null I am trying to use REGEXP_REPLACE and tried replacing every character that is not a digit or "." so that 1.2% will become 1.2. Here is…
Nitesh
  • 490
  • 3
  • 6
  • 15