I have a list of street names and I want to select all that start with \"Al\". In my MySQL I would do something like
SELECT * FROM streets WHERE \"street_nam
here is my working example:
yourDatabase->yourCollection; $regex = new Regex($text, 's'); $where = ['your_field_for_search' => $regex]; $cursor = $collection->find($where); //Lets iterate through collection