188 questions
-2
votes
2
answers
120
views
MySQL REGEXP for multiple (special) characters [duplicate]
Basically I have the following statement (that works) ...
SELECT * FROM `my_table` WHERE `my_field` REGEXP '[\[|,]24[\]|,]';
My string data is ...
[24,1,2] => FOUND
[1,24,2] => FOUND
[1,2,24] =&...
2
votes
2
answers
145
views
regular expression to allow only alphanumeric characters
I want my regular expression should error out if my string contains any character other than Alphanumeric. The string should error out if there is a new line character or any white space character in ...
1
vote
1
answer
52
views
In Snowflake Using regexp_like to search for data matching SSN pattern
I am trying to use regexp_like to search for an SSN pattern of 123-45-6789 OR XXXXXXXXX , I tried this but this is not working in Snowflake, this works in Oracle.
select * from customers where ...
0
votes
1
answer
39
views
Oracle REGEXP_LIKE fails to recognize valid input
I was looking for a way to validate US ZIP codes and got an answer here.
I tested it using regex101 site and confirmed.
However, when I use the same expression in an Oracle stored procedure and pass ...
0
votes
1
answer
175
views
Identify special character in a string which has mix of Arabic and alphanumeric and special character
I have a requirement where I need to identify if a string has any special/junk characters excluding Arabic and alphanumeric and space. I have tried below, but its not detecting spl character
select ...
2
votes
2
answers
2k
views
Oracle - How to find carriage return, new line and tab using REGEXP_LIKE?
I am trying to run a query in Oracle 11g where I am looking in a VARCHAR column for any rows that contain any of a carriage return, new line or tab. So far my code is as shown
select c1 from ...
0
votes
1
answer
458
views
How to use REGEXP_LIKE() for concatenation in Oracle
I need to make some changes in SQL within a CURSOR. Previously, the maximum value for column 'code' was 4 characters (e.g. K100, K101,....K999) but now it needs to be 8 characters (e.g. K1000, K1001, ...
0
votes
1
answer
531
views
Regular expression is not working for email address validation from DB2 database
I am using the following query to select valid email address from DB2 database.
Select CM_ID, CM_EMAIL from table_info where REGEXP_LIKE (CM_EMAIL,'^[A-Za-z]+[A-Za-z0-9.]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}...
0
votes
1
answer
187
views
Remove Duplicate nested phrases from a string with Oracle Regexp_replace
as part of a PL/SQL script, we are setting a Varchar variable called 'V_COMMENT' as such:
V_COMMENT := INCOMING_COMMENT || '[' || V_COMMENT || ']';
because this statement is run potentially multiple ...
0
votes
1
answer
37
views
Updating a data in Oracle dB
I have a datas in my Oracle DB that look like these :
2015-2265-0201 (dddd-dddd-dddd) in a column called "cote".
However, through a bad manipulation, some of these look like these :
...
0
votes
2
answers
419
views
Regex Like for ORACLE with lookahead and negative lookahead
I am working with an programm which uploads emailadresses to another programm - but it accepts emails only in one way:
i tried to write a reglular expression to filter out emailadresse which are not ...
-1
votes
2
answers
70
views
oracle REGEXP .* understanding concern [duplicate]
Question- select all city from station table where start and end letter of city must be any vowel (a/e/i/o/u).
The solution which I through:
`` SELECT city FROM station WHERE REGEXP_LIKE (city, '^(a|e|...
0
votes
1
answer
445
views
Regex that allows spaces, hyphens, uppercase and digits in PLSQL
I'm learning about regular expressions.
This expression doesn't work in PLSQL:
^[A-Z0-9 \-]{4,12}$
I'm using it this way:
IF C_INFO.ID IS NOT NULL AND REGEXP_LIKE(C_INFO.ID,'^[A-Z0-9 \-]{4,12}$')
...
-4
votes
1
answer
315
views
MySQL | Regular expressions (Regexp)
Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Your result cannot contain duplicates.
Input Format
The STATION table is described as follows:
station table
...
0
votes
2
answers
337
views
optimize mysql database search with like operator in column contains mobile numbers
I have a table with a column that contains mobile numbers, this table has about 40 millions records.
this is the table schema with some dumping data query
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- ...