Total Complexity | 0 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """ |
||
2 | Playgrounds are scripts where i testing and preparing new things and new futures. |
||
3 | |||
4 | regex |
||
5 | """ |
||
6 | |||
7 | import re |
||
8 | str = 'xccdf_org.ssgproject.content_rule_audit_rules_login_events' |
||
9 | str1 = 'oval:ssg-audit_rules_login_events:def:1' |
||
10 | str2 = 'oval:ssg-test_arle_faillock_auditctl:tst:1' |
||
11 | str3 = '1' |
||
12 | strs = [str1, str2, str, str3] |
||
13 | for string in strs: |
||
14 | print( |
||
15 | re.sub( |
||
16 | '(oval:ssg-test_|oval:ssg-)|(:def:1|:tst:1)|(xccdf_org.ssgproject.content_)', |
||
17 | '', |
||
18 | string)) |
||
19 |