-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsupersetconverter.py
58 lines (53 loc) · 2.37 KB
/
supersetconverter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 18 16:44:35 2021
@author: abhij
"""
import re
string = "L NF2 L NU' L' NF2 L NR2 NU R2 NU' NR2 NU SR2 "
string = re.sub(r'(NF )(?!\')', '2F ', string)
string = re.sub(r'(NF\' )(?!\')', '2F\' ', string)
string = re.sub(r'(NF2 )(?!\')', '2F2 ', string)
string = re.sub(r'(NR )(?!\')', '2R ', string)
string = re.sub(r'(NR\' )(?!\')', '2R\' ', string)
string = re.sub(r'(NR2 )(?!\')', '2R2 ', string)
string = re.sub(r'(NL )(?!\')', '2L ', string)
string = re.sub(r'(NL\' )(?!\')', '2L\' ', string)
string = re.sub(r'(NL2 )(?!\')', '2L2 ', string)
string = re.sub(r'(NU )(?!\')', '2U ', string)
string = re.sub(r'(NU\' )(?!\')', '2U\' ', string)
string = re.sub(r'(NU2 )(?!\')', '2U2 ', string)
string = re.sub(r'(ND )(?!\')', '2D ', string)
string = re.sub(r'(ND\' )(?!\')', '2D\' ', string)
string = re.sub(r'(ND2 )(?!\')', '2D2 ', string)
string = re.sub(r'(NB )(?!\')', '2B ', string)
string = re.sub(r'(NB\' )(?!\')', '2B\' ', string)
string = re.sub(r'(NB2 )(?!\')', '2B2 ', string)
string = re.sub(r'(TF )(?!\')', 'f ', string)
string = re.sub(r'(TF\' )(?!\')', 'f\' ', string)
string = re.sub(r'(TF2 )(?!\')', 'f2 ', string)
string = re.sub(r'(TR )(?!\')', 'r ', string)
string = re.sub(r'(TR\' )(?!\')', 'r\' ', string)
string = re.sub(r'(TR2 )(?!\')', 'r2 ', string)
string = re.sub(r'(TL )(?!\')', 'l ', string)
string = re.sub(r'(TL\' )(?!\')', 'l\' ', string)
string = re.sub(r'(TL2 )(?!\')', 'l2 ', string)
string = re.sub(r'(TU )(?!\')', 'u ', string)
string = re.sub(r'(TU\' )(?!\')', 'u\' ', string)
string = re.sub(r'(TU2 )(?!\')', 'u2 ', string)
string = re.sub(r'(TD )(?!\')', 'd ', string)
string = re.sub(r'(TD\' )(?!\')', 'd\' ', string)
string = re.sub(r'(TD2 )(?!\')', 'd2 ', string)
string = re.sub(r'(TB )(?!\')', 'b ', string)
string = re.sub(r'(TB\' )(?!\')', 'b\' ', string)
string = re.sub(r'(TB2 )(?!\')', 'b2 ', string)
string = re.sub(r'(SF )(?!\')', 'F B\' ', string)
string = re.sub(r'(SF\' )(?!\')', 'F\' B ', string)
string = re.sub(r'(SF2 )(?!\')', 'F2 B2 ', string)
string = re.sub(r'(SR )(?!\')', 'R L\' ', string)
string = re.sub(r'(SR\' )(?!\')', 'R\' L ', string)
string = re.sub(r'(SR2 )(?!\')', 'L2 R2 ', string)
string = re.sub(r'(SU )(?!\')', 'U D\' ', string)
string = re.sub(r'(SU\' )(?!\')', 'U\' D ', string)
string = re.sub(r'(SU2 )(?!\')', 'U2 D2 ', string)
print(string)