Closed GoogleCodeExporter closed 8 years ago
implementations proposed (both):
def get_regex_strings(self, regular_expressions) :
"""
Return all taget strings matched the regex uin input
"""
str_list = []
if regular_expressions.count == None :
return str_list
for i in self.strings :
cur_str = i.get()
for j in expressions.string :
expr = j.get())
if re.search(expr, cur_str) :
str_list.append(cur_str)
break;
return str_list
def get_matched_strings(self, substr) :
"""
Return all taget strings containing the substr in input
"""
str_list = []
if (sustr == None)
return str_list
for i in self.strings :
cur_str = i.get()
if cur_str.find(substr) != -1 :
str_list.append(cur_str)
return str_list
Original comment by liadalex82@gmail.com
on 12 Jan 2012 at 3:09
Sorry, the previous post contained some syntax errors...I copied the code from
a wrong version
def get_regex_strings(self, regular_expressions) :
"""
Return all taget strings matched the regex uin input
"""
str_list = []
if regular_expressions.count is None :
return None
for i in self.strings :
cur_str = i.get()
for j in expressions.string :
expr = j.get()
if re.search(expr, cur_str) :
str_list.append(cur_str)
break;
return str_list
def get_matched_strings(self, substr) :
"""
Return all taget strings containing the substr in input
"""
str_list = []
if (sustr is None):
return None
for i in self.strings :
cur_str = i.get()
if cur_str.find(substr) != -1 :
str_list.append(cur_str)
return str_list
Original comment by liadalex82@gmail.com
on 19 Jan 2012 at 11:27
Thx, it will be added :)
Original comment by anthony....@gmail.com
on 29 Jan 2012 at 3:15
Hi,
can you test with the latest mercurial version ?
I added only one function get_regex_strings and you can search a regexp, substr
...
Original comment by anthony....@gmail.com
on 23 Mar 2012 at 9:00
ok, tested.
It seems ok.
Original comment by liadalex82@gmail.com
on 29 Mar 2012 at 1:31
Original comment by anthony....@gmail.com
on 29 Mar 2012 at 3:08
Original issue reported on code.google.com by
liadalex82@gmail.com
on 12 Jan 2012 at 2:46