Build regular expressions for the following examples:
-
The string "
Dragon
".
-
The strings "
Alice
" or "Bob
".
-
Any non-empty string of digits.
-
Any string of digits of length exactly 5 characters.
-
Any non-empty string of digits of length less than or
equal to 3 characters.
-
Simple URLs of the form
"
http://fpl.cs.depaul.edu
".
-
The tokens of your favourite programming language (as long
as it is Java).