What would be the regular expression to match a correct any-depth JavaScript namespace?
Valid Entries
aa.b$a._b.$$c.__da_$09.b_$09.c_$09
So basically, JavaScript open-name variables joined by dot, and each separate name can contain a-z, A-Z, _, $ and 0-9, but cannot start with 0-9.
Invalid Entries
1a- cannot start with a digitabc.1a- a sub-name cannot start with a digit also.a- cannot have a leading dota.- cannot end with a dot
I have tried this one: ^([a-z$_][a-z$_0-9]*\.?)*[^\.]$, which while bans the trailing ., allows any extra symbols in the end, such as ,, which is invalid.
/^[a-z][0-9a-z\$\_]*(\.[a-z][0-9a-z\$\_]*)*$/i:)$or_, which it should, just like for any open-name JavaScript variable ;)[a-zA-Z\_\$]instead of[a-zA-Z]^[_$a-zA-Z][\w$]*(\.[a-zA-Z][$\w]*)*$is a simplified version of @Sphinx's regex