> For the complete documentation index, see [llms.txt](https://lupemaydana.gitbook.io/learn-mongodb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lupemaydana.gitbook.io/learn-mongodb/deeper-dive-on-the-mongodb-query-language/text-operators.md).

# Text operators

## 📌 $regex <a href="#usdregex-operator" id="usdregex-operator"></a>

To match fields with string values. You can also look for full text using **$text**

```
db.movieDetails.find({“awards.text”: {$regex: /^Won .*/}})
```

### **Description of regex**

* Slashes delimit the regular expression
* The char ^ means start at the beginning of the field we are matching
* Then match exactly the characters stated
* The . means match any character
* The \* means match any number of times
