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 1574 posted 15 years ago by jarnaldich
Searches down the current directory every file whose name matches (case insensitively) {{file_pattern}} for the regexp {{text}}.
0 1163 posted 15 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 1143 posted 15 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 1661 posted 15 years ago by adrianparr
This code separates out the Flash Player Platform, Major Version number and Minor Version numbers.
0 1513 posted 15 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 2677 posted 15 years ago by nkm
simple function to get querystring from a custom address using regular expression
0 1024 posted 15 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 1613 posted 15 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 1088 posted 15 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 2381 posted 15 years ago by adrianparr
bei Reddot als benutzerdefinierten Feldtyp einsetzbar
0 1164 posted 16 years ago by humanoid
0 1440 posted 16 years ago by Zwendel
. must be escaped using \ . It means something in regexp
0 1517 posted 16 years ago by godstroke
Functions to make using regular expressions a bit easier. They're named after the respective PHP function.
2 1675 posted 16 years ago by wizard04
0 980 posted 16 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 1683 posted 16 years ago by dreadwarrior
0 941 posted 16 years ago by wokon
3 1864 posted 16 years ago by smoover