Despite being somewhat scary, regular expressions are a very powerful tool. DatoCMS supports regex for filtering patterns in GraphQL queries. We just improved how we report syntax errors in regex to ease their usage and provide more precise feedback.
Now, providing a query like this:
{allBlogPosts(filter: {name: {matches: {pattern: "^+123"}}}) {id}}
will get you the following error:
{"data": null,"errors": [{"message": "Invalid regular expression: quantifier operand invalid (provided regular expression: \"^+123\")","locations": [{"line": 2,"column": 3}],"path": ["allBlogPosts"]}]}