Skip to main content

anchor_allowed_pattern

Function anchor_allowed_pattern 

Source
pub fn anchor_allowed_pattern(pattern: &str) -> String
Expand description

Anchor an AllowedPattern the way CloudFormation does before matching: a pattern is implicitly wrapped so it must match the whole value. A leading ^ and/or trailing $ already present are kept; missing anchors are added.