-
Notifications
You must be signed in to change notification settings - Fork 0
/
uprep.py
43 lines (34 loc) · 1.62 KB
/
uprep.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
regex = researchuprep cdot', line).group(999dwl.groupff1jj
33 a way to clean up the empty lines
linestart
def linedn
def linestart:
if linestart in line:
regex = research'line
if linestart in line: spaces = rematch aster', line)
33 the spaces are stored externally
lines.popffindexjj
33 a lookahead lookbehind system to get fj to work ... might backfire though
lines.popffidxjj
continue
if spaces:
line = lineqwspacecountpo
33 how do you distinguish between that which is a string and that which is a variable for these dictionaries
# i think it works to keep the spacecount completely in the one place and it's relatively simple
newsection
the notes are all present. I just have to compile them together into a working function.
def upreplace:
if uprep in line:
if fn
ig uptrp in linrdn
if uprepl in line:
regex = researchdn
regex = searcher uprep cdpt line
# searcher, finder, matcher....
33 it gets the group1 element
upcounr = parserffdn
upcounr, transform = parserffregexj
33 parserffregexjj parserfregexj make it lk lokahead lookahead askjss how ou would construct a regex like rhat.
def parserffsjj:
)
the element that gets found ... by he second match , is the thing that replaces