Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged regex



1 2 Next »
0 737 posted 15 years ago by troynt
This helps you stip anything from title. This example is from Symfony homepage.
0 440 posted 15 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 1488 posted 15 years ago by jdstraughan
This will count sentences that end in . or ? or ! and have a space after them.
1 1873 posted 15 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 808 posted 15 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 961 posted 16 years ago by jaytee
This function can validate and parse UK postcode like SW1A 1AA in to formated array.
2 1225 posted 16 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 849 posted 16 years ago by localhorst
Remove excess whitespaces from string Remove espaços em branco em excesso de uma string
1 748 posted 16 years ago by rafaelmt
Email validation routine Dave Child
8 978 posted 16 years ago by IanLewis
2 814 posted 17 years ago by gdonald
check if email address is valid
1 673 posted 17 years ago by assbach
0 833 posted 17 years ago by whitetiger
1 2 Next »