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
Let S =  {s 1 , s 2 , .... , s k } denote a set of k genomes. The problem of fingerprinting is the task of identifying a shortest possible substring α i from each string si such t

Write a script called 'prob2.m' that asks the user if they wish to clear the variables in the workspace. If the user responds with the strings 'y' or 'yes' then the workspace shoul

ASP.NET Support for AJAX and JavaScript IntelliSense IntelliSense for Enthusiasm JScript makes it accessible client-script selection components in the value manager in Vision Facil

Plan, design and dry run a program for the Little Man Computer (LMC) that produces the same result using a fixed number of 10 iterations.

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Flatten the tree Consider the following XML input, which groups people into two categories-salaried and hourly: Warren Rosenbaum 37 5.75

What is "No_Data_Found" in Oracle?

Write a Perl program ghici.pl, one of the simplest computer games. The program should generate a random integer between 1 and 1000 and asks the user to guess it. If the user ?nds t

While working in the eHealth Applied Research lab at Mohawk College, you are asked to transform an xml file into an XHTML representationusing XSLT for display in a browser.The xml

Let us first see the skeleton of a JavaScript file. JavaScript code should be written between the and tags. The value LANGUAGE = "JavaScript" indicates to the browser that J