-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_re.py
17 lines (13 loc) · 1019 Bytes
/
test_re.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#/*******************************************************************************************/
#/* This file is part of the training material available at */
#/* https://github.com/jthies/PELS */
#/* You may redistribute it and/or modify it under the terms of the BSD-style licence */
#/* included in this software. */
#/* */
#/* Contact: Jonas Thies ([email protected]) */
#/* */
#/*******************************************************************************************/
import re
input = 'Laplace128x256'
input_list = re.match(r"Laplace(?P<nx>[-+]?\d+)x(?P<ny>[-+]?\d+)", input)
print(f"[{input_list['nx']}, {input_list['ny']}]")