I am trying to create a RegEx pattern to check a string, but can't figure out how to get mine to work. I want it to be at least 8 characters and have a single uppercase, a single special character (!@#), and the rest lowercase or numbers. My single, I mean one, not at least one.

Here is what I have so far (this doesn't seem to work) -
Code:
^(?=.*[!@#])(?=.*[A-Z])[a-z0-9]{8,}$
If I try the following, it works, but I think the period means that the remaining 6+ characters can be pretty much any character except for newline -
Code:
^(?=.*[!@#])(?=.*[A-Z]).{8,}$