Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged regex



« Prev 1 Next »
Use a regex to check the email address input
4 112 posted 6 years ago by dreamstarter
Formats a 10-digit phone number into a good format (123) 555-1234
0 63 posted 7 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 26 posted 8 years ago by pumpkinthehead
0 51 posted 8 years ago by devnull69
{min,max}
0 13 posted 8 years ago by simondiercks
Modified regex of URL Matcher found on http://daringfireball.net/2010/07/improved_regex_for_matching_urls
0 14 posted 9 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 15 posted 9 years ago by stryju
check the original blogpost for more how-to examples
0 25 posted 9 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 116 posted 10 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 102 posted 10 years ago by the_coder
0 17 posted 11 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 48 posted 11 years ago by kouphax
1 26 posted 11 years ago by Bonky
0 16 posted 12 years ago by wbowers
This makes it easy to retrieve certain value from a url with different values appended to it.
0 19 posted 12 years ago by iTony
Why doesn't this work?
1 14 posted 13 years ago by gaunab
« Prev 1 Next »