16 questions
0
votes
2
answers
67
views
How can I find records using regex
I have some products in my table and each product has a unique number. Few examples are given below:
H-E223I22A1234
RW-E123I22B2345
E223I22A4545
Above codes are following below format:
(H|RW)- =...
0
votes
1
answer
95
views
Need regex for SQL to extract substring from a long string
I have the below string in my database (SnowFlake)
:display_redemption_mark: 0
:redeemable_properties: '1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1225,1227,1230,1231,1232,...
0
votes
2
answers
39
views
How to delete certain characters from table values?
I have a table. In one of the columns of the table , the values have this form:
Value1(12) Value2(45) Value3(35) Value4(37) Value5(17)
How to delete the opening parenthesis, the value inside the ...
0
votes
0
answers
57
views
How can I find not same data using mysql regexp in multiline text?
I tried to find the data using regexp in multiline text.
My regexp is 'Audit Policy,[A-Za-z0-9|[:space:]]+,Success and Failure'.
# query
SELECT *
FROM docs
WHERE content not regexp 'Audit Policy,[A-...
0
votes
1
answer
170
views
How to compare a parameter of a Stored procedure with a REGEXP
I have a stored Procedure that I want to use for validations in the tables, and I have a regexp that I need to compare one of the parameters, how can I compare the regexp with my parameter. I tried ...
0
votes
1
answer
1k
views
MySQL throwing error "Error Code: 3685. Illegal argument to a regular expression" when calculating accurate occurrence of phrase(s) inside column
As I mentioned in the Q-title, as now the MySQL has been heavily upgraded to version 8, which expectedly provides much new features including shortened characters for Word Boundary matching, ...
0
votes
3
answers
2k
views
MySQL REGEXP to check a string contains all these characters in any order
I'm trying to write a query that searches a list of words. One of the conditions is to check words that contain (in any order) a any of the characters in string.
For example the word must contain 'o' ...
-2
votes
1
answer
94
views
How to do Regular Expressions in JavaScript, Python, and SQL with multiple brackets and generate string from brackets that contains specific character
So, I have this data
{"ABC":"Hello"},{"DEF":"World"},{"GHI":"!!!"}
How to make a regex to generate a string inside brackets that contains ...
1
vote
1
answer
488
views
Using MySQL REGEXP to filter string with Django ORM
I have a model which have FileField field and in this model we have millions of records.
class MyModel(models.Model):
media = models.FileField(upload_to=my_function, db_index=True)
...
These ...
7
votes
3
answers
1k
views
Use SQL REGEXP (mariadb) for filter in where with special characters in Laravel [duplicate]
mariadb version 10.4
$query->where('column', 'REGEXP', '[[:<:]]'.$string.'[[:>:]]');
This query provides a search with whole words only and that's working fine without special characters.
...
1
vote
2
answers
85
views
Match specific string before user input
I have the following strings:
SDZ420-1241242,
AS42-9639263,
SPF3-2352353
I want to "escape" the SDZ420- part while searching and only search using the last digits, so far I've tried RLIKE ...
0
votes
0
answers
49
views
[MYSQL][Regular expression] Parsing a string and construct some information from it ini mysql
In a table in my database I have a sentence. I am trying to parse t and construct the categories.
The dimensions of the Item is Height:200, Width:500. And it is in red color.
Height and width can ...
1
vote
1
answer
324
views
Regex to match duplicate/alias e-mails in MySQL
I am trying to come up with some regular expression to check whether an e-mail exists in a database. What is more specific here is that I want to find e-mails that are the same, but might be written ...
0
votes
0
answers
64
views
How to ignore src, href in search query MySQL?
I have a record in product table and have string field content like this
<div class="product">
<a href="https://hostabc/item/3765/" target="_blank">
<img alt="something" ...
-2
votes
1
answer
299
views
MySql - Select records like a particular number present in a string and separated by commas [duplicate]
I have a table named product_info containing the following data:
+-------------+------------+----------------+
| title | slug | tags_id |
+-------------+------------+---------------...
0
votes
1
answer
143
views
MYSQL: IF having OR condition & REGEXP match
Goal: To block inserts into database table using trigger having multiple conditions
Description: Trying to block lots of irrelevant entries in contact table. I have created a profanity table having ...