Answers.Body: <p>Turns out asterisks can be escaped with a double slash, so you can query</p>
  <pre><code>craft.entries.title('Foo\\*').all()
  </code></pre>
  <p>and it will match <code>Foo*</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-24T09:20:21.607Z
Answers.LastActivityDate: 2023-11-24T09:20:21.607Z
Answers.UserDisplayName: gioppe
Body: <p>I've noticed that the * wildcard works for simple custom field queries, for example if I have three entries named <code>Foo</code>, <code>Foo*</code>, <code>Foo*Bar</code>, running</p>
  <p><code>craft.entries.title('Foo*').all()</code></p>
  <p>will get 3 results, and if I dump the raw SQL there's a LIKE% statement. Is there a way to disable this behavior and query for an exact match? I could filter the results  with <code>firstWhere()</code> or similar, but it seems like an unexpected behavior.</p>
  
Tags: <search><query>
Title: Wildcard searching for custom field queries
ThreadText: # Wildcard searching for custom field queries
  
  (Asked by: username_0 on 2023-11-22)
  
  I've noticed that the \* wildcard works for simple custom field queries, for example if I have three entries named `Foo`, `Foo*`, `Foo*Bar`, running
  
  `craft.entries.title('Foo*').all()`
  
  will get 3 results, and if I dump the raw SQL there's a LIKE% statement. Is there a way to disable this behavior and query for an exact match? I could filter the results with `firstWhere()` or similar, but it seems like an unexpected behavior.
  
  **Tags:** search, query
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-11-24. Score: 1 | Accepted answer
  
  Turns out asterisks can be escaped with a double slash, so you can query
  
  ```
  craft.entries.title('Foo\\*').all()
  
  ```
  
  and it will match `Foo*`
  
  
  ---
  
  