Open doktor5000 opened 1 year ago
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!
Forgot to add this - one of the character classes or named set tested was [[:alnum:]]
- complete list is here: https://www.pcre.org/original/doc/html/pcresyntax.html#SEC8
Had to rewrite that character class as [a-zA-Z0-9] which is working as expected.
Description During my tries to figure out the regex syntax for minion ID / compound targeting as described e.g. in https://docs.saltproject.io/en/latest/topics/targeting/globbing.html#regular-expressions and https://docs.saltproject.io/en/latest/topics/targeting/compound.html#targeting-compound and after asking on Slack it seems the hints present about "PCRE" regexes are slightly misleading. As this also uses the python re syntax ( https://docs.python.org/3/library/re.html ) no character classes / named sets like e.g.
[[:alnum:]]
are supported.Suggested Fix Please add a hint about python re ( https://docs.python.org/3/library/re.html ) implementation regarding the regex syntax everywhere that mentions PCRE where this is applicable. Note: such hints are already present in the documentation of some salt state/execution modules (e.g. https://docs.saltproject.io/en/latest/ref/states/all/salt.states.file.html#salt.states.file.replace ) so my confusion probably came from the mention of PCRE.
Type of documentation Salt documentation: Using Salt > Targeting Minions > Compound Targeting > Matching the minion id / Regular Expressions
Location or format of documentation https://docs.saltproject.io/en/latest/topics/targeting/globbing.html#regular-expressions https://docs.saltproject.io/en/latest/topics/targeting/compound.html#targeting-compound
Additional context