All Questions
1,690
questions
-1
votes
0
answers
19
views
Oracle regexp_like is not working as expected [duplicate]
I was testing a regular expression in Oracle SQL and found something I could not understand. I would like to check if a varchar2 value is an integer between 0 and 99999.
Both selects return 'PASS', ...
-2
votes
2
answers
36
views
Oracle regexp_replace entire matching word
Input:
ABC DEF GHIJ123A KLM GHIJ456B RST UVW GHIJ789C
Ouput:
ABC DEF GHIJ000X KLM GHIJ000X RST UVW GHIJ000X
So, I want to find all instances of words in the string that start with GHIJ and replace ...
0
votes
0
answers
31
views
ORDS SODA RegEx search not finding record
I am trying to perform a SODA search of playerName ignoring the upper- and lowercase characters. I have read Oracle manuals, googled, ChatGTP etc. but can still not find the record I search for using ...
0
votes
1
answer
53
views
How to convert oracle regex pattern into Databricks compatible version?
Given this Oracle version with the goal to convert it so it is usable in Databricks SQL:
WITH pattern AS (
SELECT
/*+ INLINE */
'^([A-Z][A-Z0-9])([A-Z]\d{3,4})([T])?([A-D])?([W]\d)?([A-RT-Z][...
0
votes
0
answers
26
views
How can I extract a digit from a string using regexp_substr in ORACLE [duplicate]
I have a test-string like this: "2 Test123 H: 6 Test23 2 H:2 H :5 H : 5"
I want to get only the digit after exactly "H: ". Not "H:", "H : " or "H :".
...
0
votes
0
answers
28
views
Convert C# REGEX to Oracle PLSQL REGEX [duplicate]
I'm trying to convert a C# REGEX into a Oracle PLSQL compatible REGEX.
This REGEX was used to validate e-mail address format.
C# REGEX
[\w!#$%&’*+\-=?\^_`{|}~]+(\.[\w!#$%&’*+\-=?\^_`{|}~]+)*@((...
0
votes
0
answers
24
views
how to pull particular string, when multiple pattern matches using regexp in oracle [duplicate]
I am trying to extract data related to string 'HP', using regexp functions, but it's not working as expected.
Scenario 1
¶¿ current reading is not ready for HP (by device). Unable to assess. ¶¿ ...
1
vote
2
answers
57
views
How to return several rows from regexp_substr
I have regex expression like this (used in oracle database):
with rws as (
select '143,3344,40099' str from dual
)
select regexp_substr (
'143,3344,40099',
'^\d+(,\d+)*$',
...
0
votes
2
answers
50
views
Removing dynamic list of strings from Oracle table
I have an Oracle table with customers and a column containing a string comma-separated list of products that they have purchased, ie
customers
products
cust_a
prod_a,prod_b,prod_c
cust_b
prod_b,...
4
votes
2
answers
99
views
Use regular expression in Oracle to extract a substring
In a table column, we have string values in the below formats,
0.0.0.1 /event/session/telco/gsm/pp/data 329765567521139953 0
0.0.1.2 /event/billing/product/fee/cycle/cycle_forward_monthly ...
1
vote
2
answers
43
views
Oracle REGEX to Match all Records that end with a Specific String
I am working in Oracle and have a value like so:
A.H.4.1.2.0000.pas A.H.4.1.2.0000.poc A.H.410000.poc A.H.420000.poc A.H.4.1.2.0000.Total A.H.4
I want to be able to remove any values that don't end ...
0
votes
1
answer
50
views
How to extract any "-letter" combination from a string and put it into its own column? [duplicate]
If I have an address like the following:
address
1234-C SMITH AVE
How can I extract the "-C" from the existing string and put "STE C" or "C" into its own column and ...
2
votes
2
answers
108
views
Oracle 19c Regex - Repeating alphabets
I'm working in Oracle 19c. I've a requirement to replace a word with a space if the word contains only the repeating alphabets.
Input - 'AAAA TEST CDDDD TEST' Output - TEST CDDDD TEST
Input - 'BAD ...
0
votes
0
answers
72
views
fn:matches executed in oracle SQL return different result as executed in any other XPath 2.0 engine
The XPath statement fn:matches("Test 123", "^\D*$", "i") returns false in every XPath 2.0 engine (Oxygen, any online tool etc). But when I execute sql statement select ...
2
votes
4
answers
115
views
String cut in SQL
I need to use SQL to extract only the YES or NO from the below strings:
'5^hgf^A^6^YES@1^g'
'H^jfd^k^i^NO@2^ojg'
So far I tried this regex:
Regexp(column_name,[^^|],1,4)
We need characters between @...