Write a regular expression in C for
* A Shake is an ampersand '&' or a plus '+' or a '/' followed by
an even number of letters 'a' through 'z' followed by an
ampersand '&' or a plus '+' or a '/' BUT IT CANNOT END WITH
THE SAME CHARACTER WITH WHICH IT STARTED. That is, if it
begins with '&', it must end with '+' or '/', and so forth.
(FYI: "an even number" means 0 or 2 or 4 or 6 or ..., which
can also be stated as 2n, where n >= 0.)
ANSWER
&([a-z][a-z])*(\+|\/)|\+([a-z][a-z])*(&|\/)|\/([a-z][a-z])*(\+|&)
EXPLANATION
Any of the below 3
([a-z][a-z])* is to get even # of letters 'a' through 'z'
Write a regular expression in C for * A Shake is an ampersand '&' or a...