# sample inputs for checking the outcomes of good inputs / test_basic_regex\r
self.good_inputs_list = [\r
"-RP '\\b\\d{3}\\b' -RPl threedigits",\r
- "-RP 'TestCase' -RP 'page' -RPl testcases -RPl page_word",\r
+ #"-RP 'TestCase' -RP 'page' -RPl testcases -RPl page_word",\r
+ "-RP '(\\b[a-zA-Z]{3}\\b)' -RPl 3LETTERS -RP '(\\b(1[\d+])|(2[\d+])\\b)' -RPl NUMBERS",\r
"-CP 'Chevalier' -CPl chev_com -RP 'welcome to Wikipedia' -RPl wiki_welcome -CP 'Warning' -CPl warning",\r
"-CP 'WP:EVADE' -CPl wp_evade" \r
]\r
#given that there are matches to be made\r
if self.pattern.search(content) is not None:\r
m = self.pattern.findall(content)\r
- temp_dict[self.label] = ', '.join(m)\r
+ m_fixed = []\r
+ for match in m:\r
+ if type(match) is tuple:\r
+ matchies = set()\r
+ for sub_m in match:\r
+ matchies.add(sub_m)\r
+ m_fixed += matchies\r
+ else:\r
+ m_fixed.append(match)\r
+\r
+ temp_dict[self.label] = ', '.join(m_fixed)\r
else:\r
temp_dict[self.label] = None \r
\r