Regular Expressions with non-capturing groups and Terraform
Regular Expressions (RegEx) are the most geeky stuff that is still borderline useful in IT. They describe patterns of strings, for example how a valid e-mail-address looks or a valid URL. We all know how a mail address looks like: someone@domain.org Here is its pattern as RegEx: .*@[^.]+.* Here is how you read that: A mail address is an arbitrary amount of arbitrary characters ( .* ) followed by the @ sign ( @ ), followed by one or more characters that are not a dot ( [^.]+ ), followed by an arbitrary amount of arbitrary characters ( .* ). The dot stands for any character, and the asterisk for an arbitrary amount. [^.] stands for any character that is not a dot, + stands for one or more occurrences. The expression is not yet quite right, but I leave it like this to run into issues and correct them below. RegEx in Linux First, let's fire up a Linux Terminal and see if we can use this: grep -P grabs for Perl-compatible regular expressions. I start it and type "this is not a m...