I would also recommend using the string. However, if you want to use the regexp, then changing it to {^ED$} is not what you want to do. Instead, change the regexp to {[ED]+}. That will match “ED” no matter where it is in the variable. It will match ED, MED, EDIT, MEDICAL and so on. Using it as Steve specified returns a “0” or false statement. The “+” at the end will match one or more instances of the previous pattern within the variable specified.
Hope this helps.
Thomas G. Rioux
The Methodist Hospital