Answers.Body: <p>I think you'd either have to hack this line <a href="https://lab.civicrm.org/extensions/areas/-/blob/e5579b00c9826cfb27cc1bfbdaca932e4cbc5864/Civi/Areas/DefinitionType/PostalCode.php#L40" rel="nofollow noreferrer">https://lab.civicrm.org/extensions/areas/-/blob/e5579b00c9826cfb27cc1bfbdaca932e4cbc5864/Civi/Areas/DefinitionType/PostalCode.php#L40</a>, or do like <a href="https://lab.civicrm.org/extensions/areas/-/blob/master/docs/developer.md" rel="nofollow noreferrer">this example</a>, and in the getWhereClause() do that logic.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-14T22:02:39.060Z
Answers.Text: Thanks, looks like a LIKE is needed, I'll give that a try.
Answers.UserDisplayName: Lars SG
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-14T21:18:53.530Z
Answers.LastActivityDate: 2023-04-14T21:18:53.530Z
Answers.UserDisplayName: Demerit
Body: <p><a href="https://lab.civicrm.org/extensions/areas" rel="nofollow noreferrer">Areas Extension</a> allows for areas to be defined by postal code. Is it also possible to define areas with postal codes that include wildcards? For example, I might want all the postal codes in the form A1A *** to be included in my area (otherwise, I have to list the thousands of possible postal codes). Has anyone got something working along these lines? None of the obvious wildcard options seems to work.</p>
  
Tags: <untagged>
Title: Can wildcards be used in Areas Extension?
ThreadText: # Can wildcards be used in Areas Extension?
  
  (Asked by: username_0 on 2023-04-14)
  
  [Areas Extension](https://lab.civicrm.org/extensions/areas) allows for areas to be defined by postal code. Is it also possible to define areas with postal codes that include wildcards? For example, I might want all the postal codes in the form A1A \*\*\* to be included in my area (otherwise, I have to list the thousands of possible postal codes). Has anyone got something working along these lines? None of the obvious wildcard options seems to work.
  
  **Tags:** untagged
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-04-14. Score: 2 | Accepted answer
  
  I think you'd either have to hack this line <https://lab.civicrm.org/extensions/areas/-/blob/e5579b00c9826cfb27cc1bfbdaca932e4cbc5864/Civi/Areas/DefinitionType/PostalCode.php#L40>, or do like [this example](https://lab.civicrm.org/extensions/areas/-/blob/master/docs/developer.md), and in the getWhereClause() do that logic.
  
  > **Comments:**
  > **username_0**: Thanks, looks like a LIKE is needed, I'll give that a try.  
  
  ---
  
  