Exercises, Questions, and Projects


  1. Test your version of the tickets application thoroughly, including the difference in response to one or more than one ticket. You also can try to improve the error message for numbers.

  2. Select a musical group of your choice. Create a regular expression that will recognize a string containing the first name of any of the members of the group. Modify that regular expression to recognize a string containing only the first name. Create a new regular expression that will recognize first, last, or first and last names.

  3. Suppose that you want to limit the quantity field to being less than a certain amount. Define a regular expression to check that the input is a whole number greater than zero and less than 1,000.

  4. Define a regular expression for dollars and cents. You will need to provide for two possible patterns: nothing to the right of the decimal point, or exactly two digits. You might also choose to accept strings with or without dollar signs.

  5. Do research if necessary and define a regular expression for another currency, such as euros or British pounds or yen.

  6. Go online and find candidate regular expressions for a valid URL. Decipher and compare the results.

  7. Go online and find candidate regular expressions for a valid e-mail address. Decipher and compare the results.




Creating Database Web Applications with PHP and ASP
Creating Database Web Applications with PHP and ASP (Charles River Media Internet & Web Design)
ISBN: 1584502649
EAN: 2147483647
Year: 2005
Pages: 125
Authors: Jeanine Meyer

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net