Find by regex using MongoDB

Search by regex in MongoDB:

db.colelctionName.find({ attr: { $regex: "/.*word.*/gi"} })

Find by regex is equivalent and correspond to like method in sql:

select * from table where attr like("%search%")