Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged regex



1 2 Next »
0 1899 posted 17 years ago by troynt
This helps you stip anything from title. This example is from Symfony homepage.
0 1322 posted 17 years ago by Zver
If you have a title, for something like a blog or product, and want to make an seo-friendly name to call it, here is a function. SAMPLE INPUT: $title = "This foo's bar is rockin' cool!"; echo make_seo_name($title); //RETURNS: //this-foos-bar-i...
10 4318 posted 18 years ago by jdstraughan
This will count sentences that end in . or ? or ! and have a space after them.
1 3564 posted 18 years ago by evanwalsh
This function uses the power of regexp to check if some bad word are on the text, also offers the posibility to change those word for something else. Examples:\r\n\r\n$texto = \'fuck off!\';\r\nfiltrado($texto); returns true since a bad word has been...
1 2187 posted 18 years ago by oso96_2000
Worst title ever. Basically, this takes a string like: "Check this out: http://snipplr.com/view/5759/replace-a-url-its-domain-name-and-create-link/" and replaces it with "Check this out: snipplr.com [with a link to the full URL]"
1 2589 posted 18 years ago by jaytee
This function can validate and parse UK postcode like SW1A 1AA in to formated array.
2 2596 posted 18 years ago by naz
When processing text for a search engine or analysis tool, code needs to strip out punctuation, formatting, spacing, and control characters to reveal indexable text. In international text there are hundreds of these characters, and some should be rem...
1 2137 posted 18 years ago by localhorst
Remove excess whitespaces from string Remove espaços em branco em excesso de uma string
1 1948 posted 18 years ago by rafaelmt
Email validation routine Dave Child
8 2641 posted 19 years ago by IanLewis
2 2132 posted 19 years ago by gdonald
check if email address is valid
1 2045 posted 19 years ago by assbach
0 2218 posted 19 years ago by whitetiger
1 2 Next »