I need to take a string like this:

UA-UI1,3,4,6

and expand it into an array of components like this:

UA1 UA3 UA4 UA6 UB1 UB3 UB4 UB6 ... UI1 UI3 UI4 UI6

(the above represents the most complex case, but I need to read
and expand several strings like this)

Can anyone suggest a simple clever way to do this? Or a package
that provides functionality that can be adapted to do this?

Failing that, I thought I might convert the above string into
a regular expression:

U[A-I][1346]

And use it to match the desired targets, but this is a much less
desirable approach (and it still looks nontrivial to make the conversion
to a regular expression...)

Any help appreciated.

Kim Helliwell
[EMAIL PROTECTED]
Homepage: http://homepage.mac.com/kimgh



Reply via email to