Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

regexNoSpecialCharacters in order.go does not like a hyphen "-" altough doc says is allowed #36

Open
wweghe opened this issue Sep 2, 2019 · 2 comments

Comments

@wweghe
Copy link

wweghe commented Sep 2, 2019

When running the sas-container-recipes, I get this message :
The --docker-namespace argument contains invalid characters. It must contain contain only A-Z, a-z, 0-9, _, ., or -
And my namespace is : sas-sbxwvw.
So either the regexNoSpecialCharacters function in order.go is not correct, or the message should be changed to not allow a "-" (hyphen)

I'm not an regexp specialist but according to https://regex101.com/ this function :
^[_A-z0-9]([_A-z0-9\-\.])$
does not allow sas-sbxwvw, whereas this function :
^[_A-z0-9]([_A-z0-9-.])$
seems to allow sas-sbxwvw

@wweghe
Copy link
Author

wweghe commented Sep 2, 2019

ok, cut&paste obviously made things worse...
This is the code in the actual container recipes and not working for me :
^[_A-z0-9]*([_A-z0-9\\-\\.]*)$

This is working fine :
^[_A-z0-9]*([_A-z0-9\-\.]*)$

@wweghe
Copy link
Author

wweghe commented Sep 2, 2019

Hmmm, but running the recipes with this regexp :
^[_A-z0-9]*([_A-z0-9\-\.]*)$ seems to result in an error :
./order.go:457:71: unknown escape sequence
so obviously it's a bit more complicated....

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant