Question

Write the regular expression that will match the following string pattern descriptions. A space character at...

Write the regular expression that will match the following string pattern descriptions.

A space character at the beginning of a line

Upper case vowel

one and more lines with a length of exactly 80 characters

A single character that cannot be an alpha or a digit

A dollar sign character ‘$’ at the end of the line

Homework Answers

Answer #1

Answer 1
*************

^\s*  //zero or more whitespace characters

Answer 2
************

^[AEYIUO]+$ // for only vowels

Answer 3
**************

/^[a-zA-Z]{80}$/

Answer 4
************

^(?=.*[a-zA-Z].*)([a-zA-Z0-9]+)$

Answer 5
**************

".*\$$"

if you have any doubt then please ask me without any hesitation in the comment section below, if you like my answer then please thumbs up for the answer, before giving thumbs down please discuss the question it may possible that we may understand the question in a different way and I can edit and change the answers if you argue, thanks :)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a regular expression that generates each of the following language constructs: (1) String constants with...
Write a regular expression that generates each of the following language constructs: (1) String constants with the following specifications: A string constant consists of any sequence of characters enclosed by the quotation marks: “ and ” The sequence may be empty.​ The sequence cannot span multiple lines. Don’t worry about escape characters (assume that they won’t appear in the input). (2) Multiple-line comment in C, C++ and JAVA with the following specifications: The comment consists of any sequence of characters...
Question 4 Write a regular expression that generates each of the following language constructs: (1) String...
Question 4 Write a regular expression that generates each of the following language constructs: (1) String constants with the following specifications: A string constant consists of any sequence of characters enclosed by the quotation marks: “ and ”       The sequence may be empty.                    The sequence cannot span multiple lines.       Don’t worry about escape characters (assume that they won’t appear in the input).       (2)  Multiple-line comment in C, C++ and JAVA with the following specifications:        The comment consists of any sequence...
Q1) Write a Python function partial_print, which takes one parameter, a string, and prints the first,...
Q1) Write a Python function partial_print, which takes one parameter, a string, and prints the first, third, fifth (and so on) characters of the strings, with each character both preceded and followed by the ^ symbol, and with a newline appearing after the last ^ symbol. The function returns no value; its goal is to print its output, but not to return it. Q2) Write a Python function called lines_of_code that takes a Path object as a parameter, which is...
Note: Do not use classes or any variables of type string to complete this assignment Write...
Note: Do not use classes or any variables of type string to complete this assignment Write a program that reads in a sequence of characters entered by the user and terminated by a period ('.'). Your program should allow the user to enter multiple lines of input by pressing the enter key at the end of each line. The program should print out a frequency table, sorted in decreasing order by number of occurences, listing each letter that ocurred along...
Strings The example program below, with a few notes following, shows how strings work in C++....
Strings The example program below, with a few notes following, shows how strings work in C++. Example 1: #include <iostream> using namespace std; int main() { string s="eggplant"; string t="okra"; cout<<s[2]<<endl; cout<< s.length()<<endl; ​//prints 8 cout<<s.substr(1,4)<<endl; ​//prints ggpl...kind of like a slice, but the second num is the length of the piece cout<<s+t<<endl; //concatenates: prints eggplantokra cout<<s+"a"<<endl; cout<<s.append("a")<<endl; ​//prints eggplanta: see Note 1 below //cout<<s.append(t[1])<<endl; ​//an error; see Note 1 cout<<s.append(t.substr(1,1))<<endl; ​//prints eggplantak; see Note 1 cout<<s.find("gg")<<endl; if (s.find("gg")!=-1) cout<<"found...
Matching Match terms to their definitions. Write the corresponding letters on the blanks. Not all terms...
Matching Match terms to their definitions. Write the corresponding letters on the blanks. Not all terms will be used. 1. framework of narrow pieces on the front of a cabinet making the door and drawer openings a. base unit b. face frame 2. used to apply pressure over the surface of contact cement bonded plastic laminates c. gain 3. point of rotation d. J-roller 4. cutout made in a piece to receive another piece, such as a cutout for a...
Chapter 20: Cabinets and Countertops Matching Match terms to their definitions. Write the corresponding letters on...
Chapter 20: Cabinets and Countertops Matching Match terms to their definitions. Write the corresponding letters on the blanks. Not all terms will be used. 1. framework of narrow pieces on the front of a cabinet making the door and drawer openings a. base unit b. face frame 2. used to apply pressure over the surface of contact cement bonded plastic laminates c. gain 3. point of rotation d. J-roller 4. cutout made in a piece to receive another piece, such...
Program Behavior Each time your program is run, it will prompt the user to enter the...
Program Behavior Each time your program is run, it will prompt the user to enter the name of an input file to analyze. It will then read and analyze the contents of the input file, then print the results. Here is a sample run of the program. User input is shown in red. Let's analyze some text! Enter file name: sample.txt Number of lines: 21 Number of words: 184 Number of long words: 49 Number of sentences: 14 Number of...
You will write a program that loops until the user selects 0 to exit. In the...
You will write a program that loops until the user selects 0 to exit. In the loop the user interactively selects a menu choice to compress or decompress a file. There are three menu options: Option 0: allows the user to exit the program. Option 1: allows the user to compress the specified input file and store the result in an output file. Option 2: allows the user to decompress the specified input file and store the result in an...
Read the following case carefully and then answer the questions. In the movie Face/Off, John Travolta...
Read the following case carefully and then answer the questions. In the movie Face/Off, John Travolta got a new look by exchanging faces with Nicolas Cage. Unfortunately, he got a lot of trouble along with it. John could receive a much less troublesome new look by using Botox, a treatment discovered by Vancouver’s Dr. Jean Carruthers, who came upon the cosmetic potential of Botox in 1982 while treating a woman with eye spasms. Botox is marketed by Allergan, a specialty...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT