Wildcard Patterns

From Pbxnsip Wiki

Jump to: navigation, search

The wildcard patterns are a simple way to match a pattern in the PBX. This pattern matching scheme is pretty simple and not as powerful as the extended regular expression (ERE) pattern matching. However, it solves most of the problems.

The wildcard pattern matching is used for example in the following places:

  • Checking the permission who is allowed to page a Paging.

The following wildcards are available:

  • A '*' matches any string (with any length).
  • A '?' matches any character (length one).
  • A '$' matches a single digit (length one).
  • A '%' matches any number (multiple digits or empty string)
  • A range enclosed in '[' and ']' matches that range.
  • A '\' matches the following character.

Examples. The following examples show typical usages of the wildcard patterns.

  • The pattern "9*" matches any thing starting with a 9.
  • The pattern "*9" matches anything ending with a 9.
  • The pattern "11[02]" matches the patterns 110 and 112.
Personal tools
Getting Help