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

How to check if all items in a group are contained in a string for many items? - RegEx

I'm planning on embedding RegEx in my SQL query so can't really use a loop for this. Essentially, I'm trying to check a series of groups to see if the name of my column contains all the attributes of any of those individual groups (i.e. groups must…
Ricardo Francois
  • 752
  • 7
  • 24
1
vote
2 answers

Oracle REGEXP_LIKE function to use index table scan?

I am using regexp_like function to search specific patterns on a column. But, I see this query is not taking the index created on this column instead going for full table scan. Is there any option to create function based index for regexp_like so…
ai03
  • 61
  • 2
  • 10
1
vote
1 answer

PowerShell - Unable to Search for [LIKE] File Names recursively through sub-directories

I have a list of a few hundred files that I need to search for. Most do NOT have file extensions, some do. I can separate those and run the job multiple times if I have to. I have a script that I have been trying to get right and it Does not seem…
user3166462
  • 171
  • 9
1
vote
2 answers

How to use regexp_like for wildcard search in oracle?

I am using the below query to get Ids like 12766% and 39998%. How I can use regexp_like to check 12%66 and 39%98? select * from table t where regexp_like( UPPER(ID),'12766|39998')
ai03
  • 61
  • 2
  • 10
1
vote
1 answer

Finding decimal values using Impala regexp_like

I'm trying to come up with a regex pattern that will work with regexp_like in Impala and which will match values that are decimals (up to ten numbers followed by a decimal followed by one or more numbers). I have a pattern which is working in .NET…
WATYF
  • 409
  • 1
  • 5
  • 16
1
vote
2 answers

not understanding regexp_like in Oracle

I have define for example below in my With clause in query: '.+d\$' as sec_level_pattern from dual And now i can see below condition in select query: not regexp_like(name,sec_level_pattern) name is column from my rd_tst table. What does the…
Symonds
  • 184
  • 1
  • 2
  • 15
1
vote
2 answers

MySql select with like and give a weight based on number of substrings found

I have a table (books) id, title I made a select with REGEXP match select title from books where title REGEXP "word1|word2|...|wordn" How can I achieve how many words I found in title in order to obtain a query like that? select title,…
blies
  • 31
  • 6
1
vote
3 answers

How to find a row where col have alphabets,numbers or special characters (except hyphen,apostrophe and space) in Oracle SQL

I have to find the name like : Robert@jr23 (There must be Alphabet,Any Special characters or Numbers except hyphen(-),apostrophe (') and Space). I was doing as below: select * from test where REGEXP_LIKE(trim(NAME_1), '[^- '']') But I am not…
Kaushal Talniya
  • 182
  • 2
  • 5
  • 12
1
vote
0 answers

How to filter query using Regular Expression?

I build regular expression script and already tested on https://regexr.com/ to make sure that I capture the correct data I want to get. I am using alibaba platform, daas to be exact and perform a query on our table. > select count(1) from ip_tbl >…
1
vote
1 answer

R - data.table fast lookup with regex

A data.table with two columns (3-grams and their counts) which has a key set on the ngrams column. The 3-grams are a single character vector of three words separated by spaces. set.seed(20182) create.ngrams <- function(){ w1 <-…
Conner M.
  • 1,954
  • 3
  • 19
  • 29
1
vote
2 answers

Hive - find 2 characters anywhere in the string/row - RLIKE

How do I get the data for ONLY “_WA” data assigned to "USA_RBB_WA_BU"? However the column I look at has rows that contain _WA and _SA (USA_CA_SAWANT) I used, select.... 'USA_RBB_WA_BU' AS State , …
YJG
  • 123
  • 2
  • 12
1
vote
0 answers

Regexp_like in Oracle 10g and 11g

I am testing Below query but I am getting different results in Oracle 10g and 11g. Query In 11g:- select * from ( select '12-22-2019' dt from dual ) where regexp_like(dt,'(12|^12)[- /.]([1-9]|0[1-9]|[12][0-9]|3[01])[- /.]2019') Results :-…
1
vote
3 answers

regexp no space

The regexp [[:blank:]] and \s arent they the same. The below shows 2 different results. select regexp_replace('Greg94/Eric99Chandler/Faulkner','/','') from dual where regexp_like(trim('Greg94/Eric99Chandler/Faulkner'),'[^[[:blank:]]]'); The…
arsha
  • 67
  • 6
1
vote
2 answers

How do I do a complex string match with Regexp?

I am trying to do search for patterns in MYSQL on some unstructured text fields, based on notes from employees that vary based on different data entry styles. Data entry might record the following for caffeine use: User 1: 'Caffeine: Never' User 2:…
1
vote
0 answers

getting most effective use of NOT regexp_like

I am looking at ways to to use NOT regexp_like to exclude various terms from a string in the most efficient manner (as background, this data is used to find births that occurred outside the hospital system): …
1 2
3
13 14