(Apr-21-2018, 02:10 PM)ljmetzger Wrote: There is a great online regex tester https://regex101.com/#python courtesy of DeaD_EyE which even generates Python code.copy and paste does not work on that page ... at least pasting the RE does not work. typing works, but i'm not very accurate at typing REs other people wrote. at least the forum post edit form lets me paste in ... (\d+(?:\.\d*)?|\.\d+)
Lewis
it look like that regex should work for me. i can just pop off the first element from the list an loop through the rest popping them as i go, 2 at a time, a number and a multiplier suffix {'day':86400,...}.
maybe the next thing to ask for is a literal arithmetic expression evaluator (have done that in C, too). then somehow combine them so i can do things like '(1week3days)/5' and get 172800.
or maybe a general purpose units suffix thing.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.