Last active
August 29, 2015 14:02
-
-
Save kevinswiber/d04bd75725713d42eec2 to your computer and use it in GitHub Desktop.
Duktape Regex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "duktape.h" | |
int main() { | |
duk_context *ctx = duk_create_heap_default(); | |
duk_eval_string(ctx, "print('Hello World'.replace(/\\s+|l*/g, ''));"); | |
duk_destroy_heap(ctx); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment