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 142 posted 9 years ago by jarnaldich
Searches down the current directory every file whose name matches (case insensitively) {{file_pattern}} for the regexp {{text}}.
0 92 posted 9 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 96 posted 9 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 195 posted 10 years ago by adrianparr
This code separates out the Flash Player Platform, Major Version number and Minor Version numbers.
0 113 posted 10 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 275 posted 10 years ago by nkm
simple function to get querystring from a custom address using regular expression
0 99 posted 10 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 135 posted 10 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 86 posted 10 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 268 posted 10 years ago by adrianparr
bei Reddot als benutzerdefinierten Feldtyp einsetzbar
0 89 posted 10 years ago by humanoid
0 132 posted 10 years ago by Zwendel
. must be escaped using \ . It means something in regexp
0 172 posted 10 years ago by godstroke
Functions to make using regular expressions a bit easier. They're named after the respective PHP function.
2 187 posted 11 years ago by wizard04
0 78 posted 11 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 103 posted 11 years ago by dreadwarrior
0 85 posted 11 years ago by wokon
3 263 posted 11 years ago by smoover