I am trying to use regexp to find some results through where clause. But results are coming as expected. Any help will be really appreciated.
username is asha123
Database query
User.where('username REGEXP ?', /(asha|asha)/)
Result
User Load (0.4ms) SELECT `users`.* FROM `users` WHERE (username REGEXP '--- !ruby/regexp /(asha|asha)/\n...\n')
=> #<ActiveRecord::Relation []>
(asha|asha)matches the same rows as simplyasha.