mongodb shell "$regex Match needs 'input' to be of type string" code example
Example: mongodb regex
{ : { $regex: /pattern/, $options: '' } }
{ : { $regex: 'pattern', $options: '' } }
{ : { $regex: /pattern/ } }
{ : { $regex: /pattern/, $options: '' } }
{ : { $regex: 'pattern', $options: '' } }
{ : { $regex: /pattern/ } }