Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please Answer the following regular expressions questions(also do number 9) Q4 Choose the pattern that finds all filenames in which the first letters of the

please Answer the following regular expressions questions(also do number 9)

Q4 Choose the pattern that finds all filenames in which the first letters of the filename are astA, followed by a digit, followed by the file extension .txt. 1) astA[[:digit:]]\.txt 2) astA[[0-9]].txt 3) astA.\.txt 4) astA[[:digit:]].txt Q5 What's the difference between [0-z]+ and \w+ ? 1) The first one accepts 0 and z and the other doesn't. 2) The first one doesn't allow for uppercase letters. 3) The first one accepts more punctuation characters than the second one. 4) Nothing. They're identical. Q6 What does the regular expression (\d{1,2}\/\d{1,2}\/\d{4} most likely represent? 1) An American ZIP code 2) A date 3) A phone number 4) A price Q7 What does the regular expression [a-zA-Z0-9_]{3,14} most likely represent? 1) An e-mail address 2) A street address 3) A username 4) A set of X and Y coordinates Q8 What does the regular expression ^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$|^([01]\d|2[0-3])(:[0-5]\d){0,2}$ most likely represent? 1) A street address 2) A name 3) A time 4) A date Q9 The regular expression ^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$ is designed to validate American ZIP Codes and Canadian Postal Codes but there are two problems with it. What is one of the flaws? 1) It doesn't allow for leaving the space out after the third character in the Canadian Postal Code. 2) American ZIP codes that start with 0 aren't accepted. 3) It requires that the string contain an American ZIP Code followed by a Canadian Postal Code. 4) It allows for American ZIP codes with 9 digits. Q10 What does the regular expression ^([0-3]|[0-9][0-9]|4[0-5][0-9]|46[0-6])$ most likely represent? 1) A range of numeric values from 0 to 499. 2) A range of numeric values from 399 to 499. 3) A range of numeric values from 399 to 466 4) A range of numeric values from 0 to 466.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2017 Skopje Macedonia September 18 22 2017 Proceedings Part 3 Lnai 10536

Authors: Yasemin Altun ,Kamalika Das ,Taneli Mielikainen ,Donato Malerba ,Jerzy Stefanowski ,Jesse Read ,Marinka Zitnik ,Michelangelo Ceci ,Saso Dzeroski

1st Edition

ISBN: 3319712721, 978-3319712727

More Books

Students also viewed these Databases questions

Question

2. Define identity.

Answered: 1 week ago

Question

1. Identify three communication approaches to identity.

Answered: 1 week ago

Question

4. Describe phases of majority identity development.

Answered: 1 week ago