Pattern matching program in xhtml, Programming Languages

Part 1
Given the following Regular Expressions, explain in detail the pattern accepted by each. Pay attention to all the characters being used. Your answers need not appear within an XHTML page.

  1. /[a-z]*\s[0-9]*/
  2. /\d+\.\d*/
  3. /^\d{3}\-\d{4}$/
  4. /^[A-Z]\d[A-Z]\-\d[A-Z]\d/
  5. /(July|August)\s+\d{1,2}(\s|,)\d{4}/g

Part 2
Given the following descriptions, write a possible regular expression that expresses each of them. Your answers need not appear within an XHTML page.

  1. Matching a Name - First name must begin with a capital letter and be at least 2 characters long followed by either a ( , ) or a whitespace. The Last Name should begin with a capital letter and be at least 2 characters long but no greater than 20 characters long.
  2. Matching an Email - First section should match word characters of any length except zero and must be followed by a @ symbol. The last section should match word characters of any length except zero and must not include an underscore ( _ ). A single period ( . ) must follow along with the word com at the end. No spacing is allowed within the pattern. The pattern need not match exactly (pattern can be a substring of a larger string).
Posted Date: 3/18/2013 2:49:45 AM | Location : United States







Related Discussions:- Pattern matching program in xhtml, Assignment Help, Ask Question on Pattern matching program in xhtml, Get Answer, Expert's Help, Pattern matching program in xhtml Discussions

Write discussion on Pattern matching program in xhtml
Your posts are moderated
Related Questions
I need help putting this into a flowchart constant c as Integer = 3500 Constant CALORIESTOOUNCE as Integer = 219 Declare Sex as Character Declare Age as Integer Declare Weight as I

How to run java program?

Object-oriented programming paradigm Object  Oriented  Programming  is  an  aproach  in  which  a  program  is  viewed  as  a  dynamic  network  of collaborating objects, where

Write a function drawCA(aname, coords) that uses the plot3 command to draw the C α backbone of the protein. When calling this function, you should pass in the aname and coords var

1. Introduction The Tube Challenge is a Guinness World Records challenge that tests both the physical and mental abilities of the person trying to break it. The main components

Expertsmind brings you unique solution in java assignments Applet In processing, and the apple company is any little application that works one specific process that works

Write and test a simple perl program on the linux platform.  You may use any linux system you wish, including the Suse linux installed in the lab. Activities. Note:  to r

Define Reasons for using Functions? 1. Evade rewriting the same code over and over. 2. It is simpler to write programs and keep track of what they are doing. Codes are able t

All programs have to be done in console application. Program 1, 2 and 3 are due on 2/11/12 Program 4, 5, and 6 are due on 2/18/12 Program 7, 8, and 9 are due on 2/25/12 Program 10

This assignment will just focus on NookyKindle eBook orders.  That is, we'll be keeping track of the titles of eBooks and the number of orders for that particular eBook during a pa