Question: 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 languageSolution needed in Python language . . O A regular expression is

. . 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!