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
-1
votes
1 answer

Extract substring with regexp in oracle

I've this expresion (CONJ|ADL|ALD|ALM|ATR|VRD)(.)*{1,6}(TERPLN|SUITE|AGP|ALM|PT|$) To extract from CL 18 A SUR 29 C 80 VRD LOS ARBOLES PT 20 I need extract 'VRD LOS ARBOLES PT' but with REGEXP_SUBSTR return 'VRD LOS ARBOLES PT 20 ' Please help me…
Milton
  • 37
  • 4
-1
votes
1 answer

oracle regular expression sub string and regular expression replace

I have Phone_number column in my table where multiple numbers inserted with character values(eg.(123).254,5674). I need to compare each values without character string and needs to remove duplicate values. Column value=…
-1
votes
1 answer

I am trying to analyze below query related to hierarchical and Regex can any one help me in understanding?

I have come across below query, but I am not able to conclude my analysis related to below query. The main aim of the below query is to convert the number to the alphabet. But the usage of the hierarchical query made me confuse. merge into s_export…
Hargun Suri
  • 171
  • 1
  • 5
  • 17
-1
votes
2 answers

How to remove the last 3 words from a string in PL/SQL?

I have strings like these: Jack & Bauer Limited Company Bristol Streetfood Limited Company München Brouse with High Jack UnlimiteD Company London What I want to have is just the company names like: Jack & Bauer Streetfood Brouse with High…
Looz
  • 377
  • 2
  • 14
-1
votes
4 answers

Oracle Regexp_substr String

I have String like a123bcd-e2343fg-hij-dfgh and I want OUTPUT e2343fg-hij-dfgh using Regular_expression in oracle. select regexp_substr('abcd-efg-hij','-[^-]+'1) from dual;
-1
votes
3 answers

Convert String into Numeric, pulling from the left of ":" and then pulling to the right of ":"

Text_value is column with string values. I need to look for ONLY ':' and separate the left from the right and convert to numeric so I can perform an easy calculation. If ':' does not exist I want nulls to return. I am creating a view in Oracle…
tot
  • 1
-1
votes
3 answers

Mysql regex search over an array of phone numbers

Need help in executing a query over a customer database on a field named phone. select * from customers where phone REGEXP '123456|565834' I need a way to select the matched portion of regex matched in select clause. The final results should be…
NavyCody
  • 492
  • 2
  • 10
-1
votes
1 answer

Oracle RegExp_SubStr Text Between character and string

Need help displaying the text between character '$' and string 'Request' If we had this string blah blah blah $60 blahblah blah Request I would like to only print out $60 blahblah blah I've tried select '$' ||…
Dritzz
  • 159
  • 1
  • 1
  • 10
-1
votes
2 answers

Oracle 11g split the string and it will use in Update statement

I don't know how to split a string in Oracle 11g. My input input string is the manufacturer name. If the Manufacturer’s Name is longer than 30 characters Find the occurrence of first occurrence of an open parenthesis – “(“ If found Find…
Chidam
  • 37
  • 2
  • 12
-1
votes
1 answer

Extract attribute value form a string using REGEXP_SUBSTR

Let's say I have following string: a=A#abc=Y#sps=Y# in some field of the table. I want to query for the a and get A with this query: select UPPER(REGEXP_SUBSTR(REGEXP_SUBSTR( 'a=Y#abc=Y#sps=Y#' , 'a\=([^#]+)#?'), '[[:alpha:]]')) from…
Mishti
  • 47
  • 6
-1
votes
2 answers

Javascript RegExp issues?

I've been trying hard to solve a problem using Js. I must define a function using RegExp that allows only 3 char words in which: The first two characters must be between a-z, excluding b The last character must be z or v Tried to build many…
-1
votes
1 answer

Search and extract data from SQL column having some delimiter

I have column in table having data in below format: (DeliveryMethod+NON;Installation_Method+NoInstallation;Services_Reference_ID+100118547,44444,33333;Service_ID+2222) (key+value;key+value;key+value;key+value;key+value;key+value;key+value;) I want…
PraveenS
  • 115
  • 13
-1
votes
1 answer

SQL - need help in parsing text of a field

I have a select query and it fetches a field with complex data. I need to parse that data in specified format. please help with your expertise: selected string = complexType|ChannelCode=PB - Phone In A Box|IncludeExcludeIndicator=I expected output…
Priya Viji
  • 39
  • 1
  • 10
-1
votes
1 answer

Query Error - Single row query returns more than one row

I have a query where the input value is as: "Amar, Akbar, Anthony" I want the query to treat input value as: 'Amar', 'Akbar', 'Anthony'. I have a regexp_substr which works in normal query and serves the purpose but when I put it with Case, it gives…
BFry
  • 905
  • 2
  • 11
  • 24
-2
votes
1 answer

Extracting string between two characters in sql oracle database

I need to extract a string that will located between two characters, with always the same pattern sample string: A CRN_MOB_H_001 a--> What is in bold AVLB is what I want to extract, the whole string will always have the same pattern, and…
lass
  • 9
  • 2
1 2 3
23
24