In my string, I only allow the following 5 special characters @_.-$
RegExp = /^[a-zA-Z0-9@$_.\\-]+$/
How do I check if a string is starting with character $ also, another looking for RegExp for a string to not end with a special character
my_regexp = /^\$[a-zA-Z0-9@$_.\\-]*[a-zA-Z0-9]$/
This omits the special characters from the character set of the last character.