Getting some chars from a string?
Richmond Mathewson
richmondmathewson at gmail.com
Tue Feb 9 14:30:22 EST 2010
On 09/02/2010 21:19, Jeff Massung wrote:
> On Tue, Feb 9, 2010 at 1:01 PM, Richmond Mathewson<
> richmondmathewson at gmail.com> wrote:
>
>
>> I have a series of image names for the type:
>>
>> f#.png
>>
>> where # can be a number anywhere between 1 and 6 figures long.
>>
>> what I need is to extract the number from the image name.
>>
>>
>>
> Try using a regular expression:
>
> function extractImageNumber pName
> local tNumber
>
> if matchText(pName,"f(\d+)\.*", tNumber) is false then
> return empty
> end if
>
> return tNumber
> end extractImageNumber
>
> Jeff M.
>
Thanks one and all for a marvellous selection of possible ways of doing
things.
NOW what I do need to know is which are the duck eggs and which are the
drakes' ?
"Aa can tell ye that missus, it's quite plain to be seen
The duck eggs is white n' the drakes eggs is green,"
The
Bellingham Show.
More information about the use-livecode
mailing list