Skip to content

Commit d4c6432

Browse files
committed
These changes address BZ185249, which detailed a missing template parameter for generating non-alphabetical symbols.
Fixed some of the characters; added a note pick 19e2e7c10 These changes address BZ185249, which detailed a missing template parameter for generating non-alphabetical symbols. Fixed a code format symbol that was showing; clarified the specifics of the symbols produced. pick 6d9071ea5 These changes address BZ185249, which detailed a missing template parameter for generating non-alphabetical symbols. Rewrote the note to cover YAML/JSON pick a17f9bea3 These changes address BZ185249, which detailed a missing template parameter for generating non-alphabetical symbols. Updated the code example to include two missing options pick 98274525b These changes address BZ185249, which detailed a missing template parameter for generating non-alphabetical symbols. Removed an unnecessary space pick 7ad3f476a These changes address BZ185249, which detailed a missing template parameter for generating non-alphabetical symbols. Cleaned up some of the text. pick c2c0efbbf These changes address BZ185249, which detailed a missing template parameter for generating non-alphabetical symbols. Revised the note to include examples of escaped characters in YAML vs. JSON pick 23e6845ac These changes address BZ185249, which detailed a missing template parameter for generating non-alphabetical symbols. Removed an extraneous bracket pick 9f5d0f506 These changes address BZ185249, which detailed a missing template parameter for generating non-alphabetical symbols.
1 parent 471da24 commit d4c6432

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)