user1344584
user1344584

Reputation: 13

regular expression mysql

I am writing a mysql select with regxp like this

SELECT name FROM employees WHERE name REGEXP '^A'

what is the regular expression syntax for this:

any record that contains gmail.com

thanks

Upvotes: 1

Views: 108

Answers (2)

Madbreaks
Madbreaks

Reputation: 19539

I wouldn't use a REGEXP here:

SELECT name FROM employees WHERE name LIKE '%gmail.com%';

Cheers

Upvotes: 1

Rusty Fausak
Rusty Fausak

Reputation: 7525

Is this what you're looking for?

REGEXP '@gmail\.com$'

Upvotes: 0

Related Questions