Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged regex



« Prev 1 Next »
Use a regex to check the email address input
4 2785 posted 12 years ago by dreamstarter
Formats a 10-digit phone number into a good format (123) 555-1234
0 2951 posted 13 years ago by cpres
Find the date with or without a year and with double or single digit month or day. Easily extendable to other date delimiters and formats.
0 2547 posted 13 years ago by pumpkinthehead
0 1584 posted 14 years ago by devnull69
{min,max}
0 1256 posted 14 years ago by simondiercks
Modified regex of URL Matcher found on http://daringfireball.net/2010/07/improved_regex_for_matching_urls
0 1126 posted 14 years ago by naren1012
it parses given string and returns 1st number it encounters ( it will replace comas with dots so floats formatted as 12,345 could be 12.345 ( some countries use that ) ) then u can parse returned value as a number / float / int - do what You need...
0 1313 posted 14 years ago by stryju
check the original blogpost for more how-to examples
0 1355 posted 15 years ago by magicrebirth
Easily grabs email addresses from a bulk text (CSV and/or some other email address-filled list/db). Example #2 takes the input (bulk text) from textarea #input and puts the clean emails in the textarea #extractedemails.
1 3656 posted 15 years ago by world_eggplant
Read a page's GET URL variables and return them as an "associative array." Calling the function while at `example.html?foo=asdf&bar=jkls` sets `map['foo']='asdf'` and `map['bar']='jkls'`
17 10890 posted 16 years ago by the_coder
0 1833 posted 16 years ago by troynt
Escape all special regex characters (.*+?|()[]{}\) from a string. Useful when dynamically building a Regular Expression object based on input text that could hold regex characters.
2 1792 posted 16 years ago by kouphax
1 2508 posted 17 years ago by Bonky
This makes it easy to retrieve certain value from a url with different values appended to it.
0 1394 posted 17 years ago by iTony
Why doesn't this work?
1 1107 posted 18 years ago by gaunab
« Prev 1 Next »