Skip to content

Commit 326d045

Browse files
Merge pull request #30790 from EricPonvelle/23903-Template-Parameter
BZ185249 - Added the `\A` parameter to the templates documentation.
2 parents 4a44c07 + d4c6432 commit 326d045

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

modules/templates-writing-parameters.adoc

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,44 @@ characters long consisting of all upper and lowercase alphabet letters
6363
and numbers.
6464

6565
The syntax available is not a full regular expression syntax. However, you can
66-
use `\w`, `\d`, and `\a` modifiers:
66+
use `\w`, `\d`, `\a`, and `\A` modifiers:
6767

6868
- `[\w]{10}` produces 10 alphabet characters, numbers, and underscores. This
6969
follows the PCRE standard and is equal to `[a-zA-Z0-9_]{10}`.
7070
- `[\d]{10}` produces 10 numbers. This is equal to `[0-9]{10}`.
7171
- `[\a]{10}` produces 10 alphabetical characters. This is equal to
7272
`[a-zA-Z]{10}`.
73+
- `[\A]{10}` produces 10 punctuation or symbol characters. This is equal to ``[~!@#$%^&*()-_+={}[]\|<,>.?/"';:`]{10}``.
74+
75+
[NOTE]
76+
====
77+
Depending on if the template is written in YAML or JSON, and the type of string that the modifier is embedded within, you might need to escape the backslash with a second backslash. The following examples are equivalent:
78+
79+
.Example YAML template with a modifier
80+
[source,yaml]
81+
----
82+
parameters:
83+
- name: singlequoted_example
84+
generate: expression
85+
from: '[\A]{10}'
86+
- name: doublequoted_example
87+
generate: expression
88+
from: "[\\A]{10}"
89+
----
90+
91+
.Example JSON template with a modifier
92+
[source,json]
93+
----
94+
{
95+
"parameters": [
96+
{"name": "json_example",
97+
"generate": "expression",
98+
"from": "[\\A]{10}"
99+
}
100+
]
101+
}
102+
----
103+
====
73104

74105
Here is an example of a full template with parameter definitions and references:
75106

0 commit comments

Comments
 (0)