import re
regex = r"-x ([\"'])(\w+)\1"
test_str = ("00 04 * * 2-6 testuser /get_results.sh -q -x 'igp_srm_m' -s 'yesterday' -e 'yesterday' -m '2048' -b >>'/var/log/process/srm-console.log' 2>&1\n"
"00 10 * * 2-6 testuser /get_results.sh -q -x 'igp_srm_m' -s 'yesterday' -e 'yesterday' -m '2048' -w '720' >>'/var/log/process/srm-console.log' 2>&1\n\n"
"00 08 * * 1-5 testuser /get_results.sh -q -x \"igp_france\" -s \"today\" -e \"today\" -m \"90000\" -b -z partA >>\"/var/log/process/france-partA-console.log\" 2>&1\n"
"00 12 * * 2-6 testuser /get_results.sh -q -x \"igp_france\" -s \"yesterday\" -e \"yesterday\" -m \"90000\" -w \"900\" -z partA >>\"/var/log/process/france-partA-console.log\" 2>&1\n\n"
"00 08 * * 1-5 testuser /get_results.sh -q -x \"igp_france\" -s \"today\" -e \"today\" -m \"90000\" -b -z partB >>\"/var/log/process/france-partB-console.log\" 2>&1\n"
"00 12 * * 2-6 testuser /get_results.sh -q -x \"igp_france\" -s \"yesterday\" -e \"yesterday\" -m \"90000\" -w \"900\" -z partB >>\"/var/log/process/france-partB-console.log\" 2>&1\n\n"
"00 12 * * 2-6 testuser JAVA_OPTS='-server -Xmx512m' /merge.sh \"yesterday\" \"igp_france\" \"partA,partB\" >>\"/var/log/process/france-console.log\" 2>&1\n"
"00 08 * * 1-5 testuser /get_results.sh -q -x \"igpswitz_france\" -s \"today\" -e \"today\" -m \"15000\" -b >>'/var/log/process/igpswitz_france-console.log' 2>&1\n"
"00 12 * * 2-6 testuser /get_results.sh -q -x \"igpswitz_france\" -s \"yesterday\" -e \"yesterday\" -m \"15000\" -Dapc.maxalerts=8000 -w \"900\" >>'/var/log/process/igpswitz_france-console.log' 2>&1\n\n"
"30 07 * * 2-6 testuser /get_results.sh -q -x \"igp_franced\" -s 'yesterday' -e 'yesterday' -m \"105000\" -b >>\"/var/log/process/franced-console.log\" 2>&1\n"
"15 12 * * 2-6 testuser /get_results.sh -q -x \"igp_franced\" -s 'yesterday' -e 'yesterday' -m \"105000\" -w \"960\" >>\"/var/log/process/franced-console.log\" 2>&1")
matches = re.finditer(regex, test_str)
result = set()
for matchNum, match in enumerate(matches, start=1):
result.add(match.group(2))
print(result)