I am new to using regex and am trying to write 2 seperate regular expressions.
One should not allow anything other than letters after the last # and must not have fewer than 2 letters after the last #.
Passing ex: #12#abc
Currently my regex doesn't allow anything but letters after the # and I can't get the rest to work. I tried using {2,}
.
Here's my attempt: ^[^#]*[#][a-zA-Z]*$
The second must not allow "&$" or "$&" after # (only 1 # is allowed in the string).
Failing ex: abc#$&ab
Here is what I was trying that is not working: ^[^#]*[#][^&]*[^\$]+$
Any help is appreciated.