Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solution needed in Python language . . O A regular expression is written in a very specific language, and its purpose is to define a

Solution needed in Python languageimage text in transcribed

. . O A regular expression is written in a very specific language, and its purpose is to define a text pattern. One of the biggest uses of regular expressions is to detect specific text patterns within a larger text file, such as a log file. For example, you might write a regex to look for the specific text that represents an HTTP 500 error in a web server log file or to look for email addresses in an SMTP server log file. In this assignment your task is to parse an industrial benchmark and extract the following patterns: Read bench.txt file as input. Extract all the rows with the following pattern from the text file (by using regex): Pattern: I - inst[digit_number] [MACRO NAME] + PLACED ([X] [Y]) [DIRECTION] ; For example: - inst2591 NAND4X2 + PLACED ( 100000 71820 ) N; In this example: Digit_number: 2591 MACRO Name: NAND4X2 X: 100000 Y: 71820 Direction: N o O O O O O

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

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions

Question

Question What is a Roth 403 (b) plan?

Answered: 1 week ago