--nextPart2605295.gElL4nP51I
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hello all,=20

I want to split a filename into it's root and extension, ie:
someFileName.txt =3D 'someFileName' and 'txt'

This is simple enough with string.split(), but what if the file has more th=
an=20
one period in it? I have worked around this by doing:

filename =3D "some.file.name.txt"
temp =3D filename.split(".")
type =3D temp.pop
fileroot =3D temp.join(".")

I was wondering though if instead of the temp variable I could just do:

fileroot, type =3D filename.split(/regex here?/)

I cannot find a way to write a regex that only matches the last period in t=
he=20
filename. Is there an elegant way to do this?

Thanks,
=2Dd
=2D-=20
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
=2D Dennis Ritchie and Ken Thompson, June 1972

--nextPart2605295.gElL4nP51I
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQBEhiwswPD5Cr/3CJgRAlCfAKDOaBUi+UivxWqNSDDexyPWKnw/HgCg2p98
hr7DXjqJVlTH/0xbp/vWDcc=
=sByE
-----END PGP SIGNATURE-----

--nextPart2605295.gElL4nP51I--