Welcome To Snipplr


Everyone's Recent Snippets Tagged regexp



replace foo -> bar in all .txt files down the tree Dunno why, the syntax highlighter adds \3's to the code. Try plain text.
0 811 posted 13 years ago by jarnaldich
Searches down the current directory every file whose name matches (case insensitively) {{file_pattern}} for the regexp {{text}}.
0 552 posted 13 years ago by jarnaldich
For several reasons, including portability, reducing download size, and general code neatness, I like to make all links within a website root relative.
0 488 posted 13 years ago by weboholic
This function trims a string and removes empty entries in a comma delimited list, removes extra commas from the beginning and end and also remove extra space characters between words.
1 944 posted 13 years ago by adrianparr
This code separates out the Flash Player Platform, Major Version number and Minor Version numbers.
0 761 posted 13 years ago by adrianparr
PCRE that matches any kind of YouTube URL and catches its video ID. It supports three kinds of URL: the classic (?v=), the AJAXed one (#!v=) and the short version (youtu.be). It also supports international URLs. Tested with Javascript and PHP.
1 1379 posted 13 years ago by nkm
simple function to get querystring from a custom address using regular expression
0 475 posted 13 years ago by mcarneiro
In AS2 forward slashes got url-encoded to %2F when you escaped them. But in AS3 they get ignored and left as they are. In some situations I have found that this can cause problems. So you can do it manually using this regular expression.
0 822 posted 14 years ago by adrianparr
Very simple to use. **Calling:** $files = dirContents(DIR_PATH, [FILTER, [TYPE]]); **Examples:** $files = dirContens("my-dir"); _$files_ is array containing all, both files either directories $files = dirContens("my-dir",...
0 483 posted 14 years ago by Lostindream
Grant Skinner's RegExr: Online Regular Expression Testing Tool is very handy for checking your regular expressions. http://www.gskinner.com/RegExr/
0 1445 posted 14 years ago by adrianparr
bei Reddot als benutzerdefinierten Feldtyp einsetzbar
0 546 posted 14 years ago by humanoid
0 732 posted 14 years ago by Zwendel
. must be escaped using \ . It means something in regexp
0 780 posted 14 years ago by godstroke
Functions to make using regular expressions a bit easier. They're named after the respective PHP function.
2 949 posted 14 years ago by wizard04
0 445 posted 14 years ago by aadsm
This snippet is useful if you want to extract the relevant parts out of an Date header field of an email message. It was created according to the [RFC 5322 rules](http://tools.ietf.org/html/rfc5322#page-15 "RFC 5322, Page 15"). It supports named capt...
1 730 posted 14 years ago by dreadwarrior
0 416 posted 14 years ago by wokon
3 864 posted 14 years ago by smoover