Hi everyone,
I have a "simple" question, especially for people familiar with regex.
I need to parse strings that have the form:
1:3::5:9
which indicates the set of integers {1 3 4 5 9}. In other words i have
a set of numbers separated by ":", where "::" indicates a range from
lo to hi inclusive. It is desirable to error check this string (i.e it
should. start and end with a number, and be composed only numbers,
"::", and ":"). I'm currently using the Boost C++ library, and i've
worked out some pretty ugly solutions. If anyone has a suggestion, I'd
very much appreciate it. Thanks!
I have a "simple" question, especially for people familiar with regex.
I need to parse strings that have the form:
1:3::5:9
which indicates the set of integers {1 3 4 5 9}. In other words i have
a set of numbers separated by ":", where "::" indicates a range from
lo to hi inclusive. It is desirable to error check this string (i.e it
should. start and end with a number, and be composed only numbers,
"::", and ":"). I'm currently using the Boost C++ library, and i've
worked out some pretty ugly solutions. If anyone has a suggestion, I'd
very much appreciate it. Thanks!
Comment