Skip to content

Instantly share code, notes, and snippets.

@fredreichbier
Forked from chanmix51/gist:318315
Created March 1, 2010 15:19
Show Gist options
  • Select an option

  • Save fredreichbier/318454 to your computer and use it in GitHub Desktop.

Select an option

Save fredreichbier/318454 to your computer and use it in GitHub Desktop.
import text/regexp/[PCRE]
main: func
{
regexp := PCRE new() .setPattern("^http://([^/]+?)(/.+)$", PCRE CASELESS)
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