-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] REGEXP_REPLACE as LikeExpression #2041
Comments
Greetings! Thank you for your interest and contribution. SELECT 'My mail address is my_mail@exasol.com'
RLIKE '(?i).*[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}.*'
AS contains_email; Now we only need to register REGEXP_LIKE as an Like Operator (like we did for I will be able to help you on this by next week only since I am somewhere between Jakarta and Lagos right now. Cheers. |
This was also my first intension to implement it similar to RLIKE, so I've added a new token But the problem is, that the
If there is no specific reason for the restriction to alphabetical characters only, I would suggest to match this regex: |
I've included an implementation of my suggestion in the PR #2044 |
I am about to implement the Exasol syntax. For this I'd like to implement REGEXP_LIKE as LikeExpression (see https://docs.exasol.com/db/latest/sql_references/predicates/not_regexp_like.htm). Since it is also allowed to be a function in Oracle (as already implemented), it needs to be added to the whitelisted keywords.
Unfortunately, the following condition prevents it from being added to
RelObjectNameWithoutValue
since REGEXP_LIKE contains an underscore which is not allwed here:tokenValue.matches("[A-Za-z]+")
JSqlParser/src/main/java/net/sf/jsqlparser/parser/ParserKeywordsUtils.java
Line 235 in 11cebcf
What was the reason for adding this condition and how can or should I proceed to support REGEXP_LIKE as LikeExpression?
The text was updated successfully, but these errors were encountered: