2

This is what I got so far I'm getting some status to fail;

https://regex101.com/r/KuUS5L/1

[[:<:]]lms.com[[:>:]]

These are my expected status:

Keyword status
lms.com 1
live.lms.com 1
live-lms.com 0
cssslms.com 0
lmsccc.com 0
lms.com.ph 0
lms.com.edu 0
SELECT 
*
 FROM
(SELECT 
    SUBSTRING_INDEX(email, '@', - 1) AS substrEmail1,
    email
FROM
    members m1) AS d
 WHERE d.substrEmail1 regexp '[[:<:]]gs.com[[:>:]]';
4

1 Answer 1

1

Here is my answer, provided also in the comments.

Either:

select * from test
where url REGEXP '^([[:alpha:]]+\\.lms|lms)\\.com$' = 1;

Or

select * from test
where url REGEXP '^([[:alpha:]]+\\.)?lms\\.com$' = 1

See it working here: http://sqlfiddle.com/#!9/a51de/2

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.