Skip to content

Instantly share code, notes, and snippets.

@creationix
Created July 29, 2015 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save creationix/a900d58f77b89efe8fda to your computer and use it in GitHub Desktop.
Save creationix/a900d58f77b89efe8fda to your computer and use it in GitHub Desktop.
tim@panther:~/luvi$ ./build/luvi ~/luvit
Welcome to the Luvit repl!
> require('pcre')
{ split = function: 0x40fb5508, find = function: 0x40fb51a8, version = function: 0x40fb55a0,
new = function: 0x40fb5550, _newmembuffer = function: 0x40fb5750,
_VERSION = 'Lrexlib 2.8.0 (for PCRE)', match = function: 0x40fb5180, gsub = function: 0x40fb51f8,
flags = function: 0x40fb5578, maketables = function: 0x40fb53f8, count = function: 0x40fb54c0,
gmatch = function: 0x40fb51d0, config = function: 0x40fb5448 }
> require('pcre').split("ababdebabadebadbadbae", "a")
function: 0x415bd370
> for i in require('pcre').split("ababdebabadebadbadbae", "a") do print(i) end
b
bdeb
b
deb
db
db
e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment