IP addresses are important for computers to be able to communicate with eachother on the Internet. They identify a 'host' (personal computers are a kind of host) and enable other hosts to pass information to it, similar to an home address for physical packages or mail. Develop a regular expression that matches a well formed IPV4 address in dot-decimal notation. An IPV4 address follows the scheme below: • 4 numbers that are separated by dots. • The first number is within the range of o and 223. • The second number is within the range of o and 255. • The third number is within the range of o and 255. • The fourth number is within the range of 0 and 255. • There may be a subnet mask at the end of the address, which has a slash '/' followed by a number between 1 and 30.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Exercise 17
IP addresses are important for computers to be able to communicate with eachother on the Internet.
They identify a 'host' (personal computers are a kind of host) and enable other hosts to pass information to it, similar
Develop a regular expression that matches a well formed IPV4 address in dot-decimal notation.
an home address for physical packages or mail.
An IPV4 address follows the scheme below:
• 4 numbers that are separated by dots.
• The first number is within the range of o and 223.
• The second number is within the range of 0 and 255.
• The third number is within the range of o and 255.
• The fourth number is within the range of o and 255.
• There may be a subnet mask at the end of the address, which has a slash '/' followed by a number between 1 and 30.
Exercise 17
Test Strings:
Test Suite: (Should be ACCEPTED)
REJECT: 127.0.0.1
REJECT: 192.168.0.254
REJECT: 10.4.1.211
REJECT: 6.147.190.64
REJECT: 202.156.3.78
REJECT: 0.0.0.0
REJECT: 192.168.1.1/12
REJECT: 10.24.3.2/30
Test Suite: (Should be REJECTED):
REJECT: 128.2.14.257
REJECT: 127.0.0.00
REJECT: 192.168.01.5
REJECT: 233.134.2.3
REJECT: a.0.0.1
REJECT: 127.b.0.1
REJECT: 192.169.c.3
REJECT: 102.34.2.d
REJECT: 127..0.0.1
REJECT: 8.5.4.2.
REJECT: 192.168.1.1/
REJECT: 192.168.1.1/33
Transcribed Image Text:Exercise 17 IP addresses are important for computers to be able to communicate with eachother on the Internet. They identify a 'host' (personal computers are a kind of host) and enable other hosts to pass information to it, similar Develop a regular expression that matches a well formed IPV4 address in dot-decimal notation. an home address for physical packages or mail. An IPV4 address follows the scheme below: • 4 numbers that are separated by dots. • The first number is within the range of o and 223. • The second number is within the range of 0 and 255. • The third number is within the range of o and 255. • The fourth number is within the range of o and 255. • There may be a subnet mask at the end of the address, which has a slash '/' followed by a number between 1 and 30. Exercise 17 Test Strings: Test Suite: (Should be ACCEPTED) REJECT: 127.0.0.1 REJECT: 192.168.0.254 REJECT: 10.4.1.211 REJECT: 6.147.190.64 REJECT: 202.156.3.78 REJECT: 0.0.0.0 REJECT: 192.168.1.1/12 REJECT: 10.24.3.2/30 Test Suite: (Should be REJECTED): REJECT: 128.2.14.257 REJECT: 127.0.0.00 REJECT: 192.168.01.5 REJECT: 233.134.2.3 REJECT: a.0.0.1 REJECT: 127.b.0.1 REJECT: 192.169.c.3 REJECT: 102.34.2.d REJECT: 127..0.0.1 REJECT: 8.5.4.2. REJECT: 192.168.1.1/ REJECT: 192.168.1.1/33
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Files and Directory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education