[Tutor] reading parts of a input string into different variables based on units.
timmichelsen at gmx-topmail.de
Thu Mar 20 01:04:06 CET 2008
thank you for the fast reply!
> A regex would avoid that since it would detect an m
> as being diffrent to a cm or mm.
> Of course you will have to work out the right regex but that
> shouldn't be too difficult if you are sure you have a whitespace
> separator and a number followed by the unit string.
I will see whether I can get the right regex together. Ease for educated
computer scientist but for me coming from a Non-Programmer background
the rege still bears some fear... and a learning curve.
> Now you have a list of values for each unit, you just need
> to convert the string values to numeric and sum them or
> whatever else you need to do.
I will try to step forward and the send my results back.
Thanks and regards,
More information about the Tutor