C
Corne van Tonder
Hey folks,
Here's something I'm struggling with at the moment that I was hoping you
guys and/or girls could help me with.
If I gave you the following two strings...
1 /this/is/a/file/or/directory/path
10 /this/is/a/file/or/directory/path
Now, in each case I need to take retrieve only the numeric data from the
string. This would be easy, if i was using substr() and I was sure that I
was working with only a fixed length on the numeric data, but as you can
see, it could be either 1, 2 or more chars in length. How can I do it?
Many thanks for any replies.
cvt
Here's something I'm struggling with at the moment that I was hoping you
guys and/or girls could help me with.
If I gave you the following two strings...
1 /this/is/a/file/or/directory/path
10 /this/is/a/file/or/directory/path
Now, in each case I need to take retrieve only the numeric data from the
string. This would be easy, if i was using substr() and I was sure that I
was working with only a fixed length on the numeric data, but as you can
see, it could be either 1, 2 or more chars in length. How can I do it?
Many thanks for any replies.
cvt