I am getting weird answers with regularexpression with setlist on mysql



I have 3 students with the surname 'kim'(seolhyun kim, irene kim and jisoo kim) in my student table and I have created a student_name column that consists of the students' full name. When I try to get a specific student's name using regular expression and the set list [], I do not get the name i want out of these 3.

When I use "where student_name regexp '[seolh] kim'; ", Irene kim and Jisoo kim names gets returned instead of Seolhyun kim. If I just use "where student_name regexp '[se] kim'; ", Irene kim's name gets returned and if i use Seolhyun's full first name "where student_name regexp '[seolhyun] kim'; ", all of the 3 women's name gets returned.

SELECT roll_number, student_name
FROM student
WHERE student_name REGEXP '[SE] KIM';

Continue reading...