lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hey guys! I get in this list today :)

In PHP, I can make this with preg:

preg_match('/^(\/var\/www\/)(.*)/', '/var/www/files/index.php', $array_result);

and I will get:
$array_result[0] = /var/www/files/index.php
$array_result[1] = /var/www/
$array_result[2] = files/index.php

How can I get a similar thing in Lua ?

- Walter
"A graça cria beleza a partir das coisas feias" (Bono Vox)