I am also not a expert in RegEx, but I guess I know the solution for your issue.
Try with this, simple mistake :-),
^([A-Z]|[0-9]){18}
it should check for characters and digits, if you want to include more special characters to allow, attach to the same string with the pipeline "|" mark. Your expr.. also may work, but you can keep it clean by having seperators like above.
You may check for special chars syntax to represent in expression in the following,
http----//www----devguru----com/Technologies/ecmaScript/quickref/regexp_special_characters.html
If you want to allow a space then it's "\s", (you can find more in the above), the expression will be like
^([A-Z]|[0-9]|[\s]){18}
hope this would help you understand about regex...
Thanks,
Chinthana