Closed diegomcas closed 4 years ago
from parse impor * str = ' 12 , 34 '
print(search('{:^},{:^}', a)) <Result ('12', '3') {}>
print(parse('{:^},{:^}', a)) <Result ('12', '34') {}>
Thanks, I've altered the code to have it attempt to match more of the trailing centered content.
from parse impor * str = ' 12 , 34 '
Incorrect with search
print(search('{:^},{:^}', a)) <Result ('12', '3') {}>
Correct with parse
print(parse('{:^},{:^}', a)) <Result ('12', '34') {}>