Skip to content
Advertisement

Tag: regex

SQL similar to regex, equivalents for start ^ and end $ of line

I want to use a regex like (^|s)1001(s|$) in a Firebird similar to expression: Examples: abc 1001 abc – true abc 121001 abc – false 1001 abc – true 121001 – false abc 1001 – true I try’d to convert it to a regex in Firebird: Where COLUMN similar to (^|[:WHITESPACE:])abc 1001 abc($|[:WHITESPACE:]), but ^ (start of line) and $

oracle get all matched occurrences from a column

I have a table, which has 2 columns: ID & JOB_Description(Text). I would like to write an oracle SQL to extract all substrings in the Description column which match a regular pattern. However, I have learnt how to extract matched substrings from a string with below SQL, but I have no idea to apply below SQL on all data in

Using ‘LIKE’ and ‘REGEXP’ in a SQL query

I’m trying to use some regex on an expression where I have two conditions on the WHERE clause. The pattern I want to capture is 106 followed by any digit followed by a digit that must be either 3 or 4, i.e. 106[0-9][3-4] First, I tried this: This produced an error as below and it would be good to know

SQL/Regex Challenge/Puzzle: How to remove comments from SQL code (by using SQL query)?

Requirements Single-lines comments (e.g. — my comment) should be removed. Multi-line comments (e.g. /* my comment */) should be removed. The content of strings literals (e.g. ‘this is a multi-line comment: /* my comment */’) should be ignored. The content of identifiers (e.g. “– column 1 –“) should be ignored. literals and identifiers Literals and identifiers can span over multiple

Oracle Regular Expression (REGEXP_LIKE) Too Long Error – ORA-12733

I have to validate an IPv6 address in PL/SQL. I came up with the regular expression from here: Regular Expression (RegEx) for IPv6 Separate from IPv4 I am getting an ORA-12733: regular expression too long error. Is there any way around this? The limit is 512 (https://stackoverflow.com/a/2694119/3112803), I’m at 657. I cannot think of any way to split this up.

Access UPDATE query using Regular Expressions

I have created the following Regular expression in javascript to test if the string works. which works perfectly fine. However no i have tried to convert this SQL (using the ms access sample database) i have tried the following which hasn’t worked as i get an error. which didn’t work. I think I’ve gone about the wrong approach to the

Advertisement