---
title: Patterns
description: Reference for Java regular expression patterns in PingGateway configuration parameters, expressions, and pattern templates with capturing groups
component: pinggateway
version: 2024.11
page_id: pinggateway:reference:Patterns
canonical_url: https://docs.pingidentity.com/pinggateway/2026/reference/Patterns.html
llms_txt: https://docs.pingidentity.com/pinggateway/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2026-06-02T09:47:34Z
superseded_by: https://docs.pingidentity.com/pinggateway/2026/reference/Patterns.html
section_ids:
  Patterns-template: Pattern templates
  Patterns-moreinfo: More information
---

# Patterns

Patterns in configuration parameters and expressions use the standard Java regular expression [Pattern](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html) class. For more information on regular expressions, refer to Oracle's [tutorial on Regular Expressions](https://docs.oracle.com/javase/tutorial/essential/regex/index.html).

## Pattern templates

A regular expression pattern template expresses a transformation to apply for a matching regular expression pattern. It may contain references to [capturing groups](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html#cg) within the match result. Each occurrence of `$g`, where *g* is an integer value, is substituted by the indexed capturing group in a match result. Capturing group zero `"$0"` denotes the entire pattern match. A dollar sign or numeral literal immediately following a capture group reference can be included as a literal in the template by preceding it with a backslash (`\`). Backslash itself must be also escaped in this manner.

## More information

Java [Pattern](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html) class

[Regular Expressions tutorial](https://docs.oracle.com/javase/tutorial/essential/regex/index.html)
