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
Have the user input two values. Store them in variables called savings and expenses, both of data type double. If expenses is less than savings, subtract expenses from savings, o

The program output is intended to be parsed by a script working on the log file or correlated in a spreadsheet.  Use the "csv" format (you will have to research "what" is a "csv" f

Write a program that takes names of 5 students in 2D Character Array and their GPAs in 1D array. Arrange the names in alphabetical order and display on screen along with GPA.

Explain what is HTML language with an example? HTML is the HyperText Markup Language. HTML files are text files featuring semantically tagged elements. HTML filenames are suff

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

Design and implement a stringed musical instrument class using the following guidelines: a. Data fields for your instrument should include number of strings, an array of stri

Support for Multi-Targeting The multi-targeting function of Vision Facilities allows you specify the particular edition or account of the .NET Structure that is required for your p

non restoring division

write a function that raises an integer to a positive integer power. call the function x_to_the_n taking two integer arguments x and n. have the function return a long int, which r

A non-empty string β is called a repeat pre x of a string s if ββ is a pre x of s. Give a linear time algorithm to find the longest repeat prefix of s. Hint: Think of using lca