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
1. A readme.txt file with: a. Instructions on how to compile and run your client and server code on the command line. (Also provide shell scripts if the commands are complicated

Create a Money data structure that is made up of amount and currency.  (a) Write a constructor for this data structure   (b)  Create accessors for this data structure (c)

The first task is to extend the  NeoPhoneBookEntry and  NeoPhoneBook classes to accommodate for  four additional contact  details:  Ringtone,  Vibration Pattern,  Led Pattern  and

Object-oriented languages Languages that support OOP features can be classified into the following two categories: 1.    Object-based programming languages, and 2.      O

Write a booking and pricing system for seats for performances in a theatre. Design and write a system to handle information (equipment, people, events etc.) for a club. Given

Explain the Continue statement - Computer Programming? This is alike to break but is encountered less frequently. It merely works within loops where its effect is to force an imm

The GuessingGame class contains a skeleton for a program to play a guessing game with the user. The program should randomly generate an integer between 1 and 10 and then ask the us

Windows Presentation Foundation Designed by Microsoft Technologies, the Microsoft Technologies windows Display Groundwork (or WPF) is a computer-software graphic subsystem for maki

Describe briefly how you might program a computer to exhibit fear or sorrow.

Assignment for Networing&camunication