Show More
@@ -155,6 +155,13 b" def globre(pat, head='^', tail='$'):" | |||
|
155 | 155 | group = False |
|
156 | 156 | elif c == ',' and group: |
|
157 | 157 | res += '|' |
|
158 | elif c == '\\': | |
|
159 | p = peek() | |
|
160 | if p: | |
|
161 | i += 1 | |
|
162 | res += re.escape(p) | |
|
163 | else: | |
|
164 | res += re.escape(c) | |
|
158 | 165 | else: |
|
159 | 166 | res += re.escape(c) |
|
160 | 167 | return head + res + tail |
General Comments 0
You need to be logged in to leave comments.
Login now