I have a registration code that will always look like this.
1000000001-YZKCGXZS-000000000000
what I need to do is store everything on the left of the first dash in varA, everything between the dashes in varB, and everything after the last dash in varC.
The portion at the beginning will always be 10 characters.
the portion at the end will always be 12 characters.
But the stuff between the dashes can vary in length.
I'm sure I can use regular expressions to do this, but my knowledge of regular expressions is very limited. Could someone provide me with some sample code and a brief explanation of how it all works?
Thanks so much,
Jewel
When faced with a decision, always ask, 'Which would be the most fun?'
1000000001-YZKCGXZS-000000000000
what I need to do is store everything on the left of the first dash in varA, everything between the dashes in varB, and everything after the last dash in varC.
The portion at the beginning will always be 10 characters.
the portion at the end will always be 12 characters.
But the stuff between the dashes can vary in length.
I'm sure I can use regular expressions to do this, but my knowledge of regular expressions is very limited. Could someone provide me with some sample code and a brief explanation of how it all works?
Thanks so much,
Jewel
When faced with a decision, always ask, 'Which would be the most fun?'