Questions tagged [regexp-like]

Oracle function similar to the LIKE condition, but REGEXP_LIKE performs regular expression pattern matching. See also REGEXP_INSTR, REGEXP_REPLACE, REGEXP_SUBSTR and REGEXP_COUNT for other functions extended to use regular expressions.

199 questions
0
votes
1 answer

Oracle: Find control characters except line feed

I'm trying to all rows where a column contains any control charters with the exception of the line feed character (hex value of A). I've tried the following, but this only returns results that have a control character and don't have a line feed. I…
jcarman
  • 3
  • 2
0
votes
1 answer

Selecting posts where category is like multiple category IDs using REGEXP

I have a string of category IDs that look like this 1;2;3;4;. Now I want to fetch all the posts that contain each of these variables in the category column of the posts table. The category column also have the content like this 1;2;3; depending on…
Gjert
  • 1,069
  • 1
  • 18
  • 48
0
votes
1 answer

Oracle SQL REGEXP_LIKE not returning expected result

Do you know why this SQL command on Oracle 11g R2 Express Edition (XE) does not return expected result ? SELECT 'X' FROM dual WHERE REGEXP_LIKE('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR…
Vince
  • 9
0
votes
1 answer

Oracle Regex_like function: returning what failed

I have an oracle function that is returning whether an email address is valid or not CREATE OR REPLACE FUNCTION valid_email (p_email in varchar2) return string is v_return varchar2(255); cemailregexp…
Jay Rizzi
  • 4,196
  • 5
  • 42
  • 71
0
votes
1 answer

Regexp_like check for symbol in string

If I want to check that string contains @symbol I can write something like REGEXP_LIKE(source_column,'@') or REGEXP_LIKE(source_column, '.*@.*') What is the difference between these two forms? And why REGEXP_LIKE(source_column,'@') returns true…
TOP KEK
  • 2,593
  • 5
  • 36
  • 62
0
votes
1 answer

Is 'a^b' a valid Regular Expression in oracle sql?

Is 'a^b' a valid Regular Expression in oracle sql? If yes what are the strings(give some examples) that could qualify. select name from employees where regexp_like(name,'a^b');
sql_dummy
  • 715
  • 8
  • 23
0
votes
3 answers

SQL using regular expression REGEXP_LIKE()

I'm having some issues where I can't seem the like regex to match 3 or more a's or e's in the name. Find all managers that manage employees with at least 3 letters 'a' or 'e' in their name (both uppercase and lowercase). For instance having 2 'a'…
camdixon
  • 852
  • 2
  • 18
  • 33
0
votes
1 answer

What is the difference between following SQL queries containing REGEXP_LIKE()?

select distinct first_name from EMPLOYEES where regexp_like(first_name,'^[^AEIOU]*[^aeiou]$'); select distinct first_name from EMPLOYEES where regexp_like(first_name,'^[^AEIOU].*[^aeiou]$'); I am trying to find Employee's first name's…
user5093601
0
votes
1 answer

"regexp-like" in Oracle returning inaccurate results

I am having trouble in retrieving the correct data for a column, using regular expressions in Oracle 11. The column is of type varchar, and looks like this: 2216xxxx 20xxxx 2355xxxx 2128xxxx 213xxxx 692xxxx I am using this part of the…
gm08
  • 29
  • 8
0
votes
3 answers

How to use Regex_Like for this case?

I have a field named Order_ID from table Order. when value of Order_ID starts with numeric value then it should exclude those records, otherwise it should include those records in the report. For example: if the Order_ID starts with a value 1ABC it…
Gayathri
  • 339
  • 2
  • 15
  • 26
0
votes
1 answer

Exclude numeric values from report

I have a field named statu in the table TB_ORDERS. If the field status has a numeric value, I should exclude that record from report - only alphabetical should be shown. How do I do that?
sith
  • 335
  • 2
  • 3
  • 9
-1
votes
1 answer

Snowflake SQL REGEXP function to replace any field with letters or symbols with 0

I'm working in Matillion/Snowflake and stuck on some REGEXP functions. I have a varchar field with a few entries containing letters and hyphens and looking for a way to make any field contains letters or hyphens be 0. Any help would be welcome! Been…
-1
votes
2 answers

oracle REGEXP .* understanding concern

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|i|o|u)$', 'i')``` But this is not Giving any…
-1
votes
1 answer

how to retrieve data that contains special characters including alphabet

I'm using oracle and hive db engine and supposed that in a varchar column (phone number), I only want to retrieve record with digit and hyphen '-' i.e. 03-1234 5678 But how if I want to retrieve if column has special chars (except hyphen) and…
Belle
  • 1
  • 1
  • 4
-1
votes
1 answer

Oracle REGEXP_LIKE ignore CASE SENSITIVITY

We are trying the following request in Oracle Database 19.3 and the result is ever like the case sensitivity was ignores. select 1 from dual where regexp_like('CHIEN', '[a-z]+', 'c'); And the result of the request is 1 Even with: ALTER SESSION SET…
Chris
  • 9
  • 2