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
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

The aim of this task is to gain experience in using the popular Web languages XSLT, XQuery, DTD, XML Schema and RDF. The Content: The University is organizing a stage show wh

A partly completed project Cwk 4-students is available for downloading from Studynet Assignments. You are required to amend this BlueJ project to implement a version of the WHEN sy

Often, DNA sequences are represented as a sequence of characters (String) and each character in the sequence corresponds with one of four nucleotides. A = adenine, C = cytosine,

1.  Use mathematical induction to prove Whenever n is a positive integer. 2.  Use loop invariant to prove that the program for computing the sum of 1,...,n is correct.

1. Develop a Web page, indicating an ordered list of the names of your five friends. 2. Develop an HTML document with a nested list indicating the content page of any book 3.

We will be assuming here that our roots are of the form, in this case, r 1,2 = l + mi If we take the first root we'll find the following solution. x l + m i It i

Design an application that opens and analyses word files. Requirements: Create an application that analyses text documents. It should open a text file, read each word in

Area Under Curve Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve be

In this question we will de ne a function for sorting lists based upon the algorithm selection sort. First, de ne a function smallest which takes as input a list of integers and r