Skip to content

Instantly share code, notes, and snippets.

@chanmix51
Created March 1, 2010 12:14
Show Gist options
  • Save chanmix51/318315 to your computer and use it in GitHub Desktop.
Save chanmix51/318315 to your computer and use it in GitHub Desktop.
import text/regexp/[PCRE]
main: func
{
regexp := PCRE new() .setPattern("#^http://([^/]+?)(/.+)$#i", 0)
if (regexp matches("http://www.google.fr/images?a=pika&b=chu"))
{
"OK" println()
}
else
{
"NOT" println()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment