I can extract a particualr pattern by reading mystring.txt file line by line and checking the line against re.search(r'pattern',line_txt) method.
Following is the mystring.txt
`
Client: //home/SCM/dev/applications/build_system/test_suite_linux/unit_testing
Stream: //MainStream/testing_branch
Options: dir, norm accel, ddl
SubmitOptions: vis, dir, cas, cat
`
using python, I can get the stream name as //MainStream/testing_branch
import re
with open("mystring.txt",'r') as f:
mystring= f.readlines()
for line in mystring:
if re.search(r'^Stream\:',line):
stream_name = line.split('\t')[1]
print stream_name
instead of going line by line in a loop, how is it possible to extract the same information by only using the re module?