Question: # Compile our regex search pattern as before. Ensure your expression can account for the location of the match in the string. # note: you

# Compile our regex search pattern as before. Ensure your expression can account for the location of the match in the string. # note: you can use + to match the character one or more times, use

**

for 0 or greater than zero\

pattern =\ count =0

\ #the re.finditer funciton will allow to find all matches iteratively, the function expects the pattern then the data # create a for loop using finditer to identify matches to your expression in the file "gb_input"\ #keep a count of each match\

count =

\ # retain the start position of the index of the match (integer) using the function start; eg. match.start() string_Start

=

\ # likewise for the final index of the match (integer) using the function end string_End

=

\ # using the function group, store the entire short string entire_short_string

=

\ # Use the provided code to print the matching string, and its start and stop print('Match: {} "{}" found at:

{},{}

'. format(count, entire_short_string, string_Start, string_End))\ # print the total number of matches print("InTotal Sequences Found:", count)

 # Compile our regex search pattern as before. Ensure your expression

\# Compile our regex search pattern as before. Ensure your expression can account for the location of the match in the string. \# note: you can use + to match the character one or more times, use * for o or greater than zero pattern=count=0 \#the re.finditer funciton will allow to find all matches iteratively, the function expects the pattern then the data \# create a for loop using finditer to identify matches to your expression in the file "gb_input" \#keep a count of each match count= \# retain the start position of the index of the match (integer) using the function start; eg. match.start() string_Start = \# likewise for the final index of the match (integer) using the function end string_End = \# using the function group, store the entire short string entire_short_string = \# Use the provided code to print the matching string, and its start and stop print('Match: \{\} " \{\} " found at: [{},{}]. format(count, entire_short_string, string_Start, string_End)) \# print the total number of matches print("InTotal Sequences Found:", count)

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!