Skip to content

Commit

Permalink
Single quotes for regex
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesread committed Aug 12, 2024
1 parent fa40c0c commit 1832a53
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/ROOT/pages/args.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ image::images/args3.png[]

OliveTin version 2024.02.081 and above support custom regex patterns for argument types. Here is an example to validate against any 3 letter word;

NOTE: The regex pattern should be enclosed in single quotes, otherwise you will probably get a YAML error when starting OliveTin.

[source,yaml]
.`config.yaml`
----
Expand All @@ -107,9 +109,12 @@ actions:
shell: echo "{{ message }}"
arguments:
- name: message
type: "regex:^\w\w\w$"
type: 'regex:^\w\w\w$'
----

The site http://regex101.com is a good place to test your regex patterns.



[#arg-suggestions]
=== Suggestions
Expand Down

0 comments on commit 1832a53

Please sign in to comment.