Web applications have several challenges; perhaps the most serious being the difficultly in maintaining state information. A common solution to this issue is to use cookies as a mechanism to encode and distribute this information. However, as the cookie passes from a server to a client and back neither side can assume that the cookie is valid.
You are required to produce a Java program, which uses the regular expression to answer the question: "Is this cookie (supplied as an input) valid or not?"
For this assignment, a valid cookie is defined by these subset of rules found in RFC 6265 (HTTP State Management Mechanism), along with RFC 2616, RFC 1123, and RFC 1034. Note that only the rules in this assignment have to be implemented. A fully functional cookie checker is not required. set-cookie-header = "Set-Cookie:" SP set-cookie-string set-cookie-string = cookie-pair *( ";" SP cookie-av ) cookie-pair = cookie-name "=" cookie-value cookie-name = token