Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged regex



« Prev 1 Next »
Use a regex to check the email address input
4 1020 posted 10 years ago by dreamstarter
Formats a 10-digit phone number into a good format (123) 555-1234
0 1160 posted 11 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 827 posted 12 years ago by pumpkinthehead
0 883 posted 12 years ago by devnull69
{min,max}
0 634 posted 12 years ago by simondiercks
Modified regex of URL Matcher found on http://daringfireball.net/2010/07/improved_regex_for_matching_urls
0 521 posted 13 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 698 posted 13 years ago by stryju
check the original blogpost for more how-to examples
0 700 posted 13 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 2556 posted 14 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 4850 posted 14 years ago by the_coder
0 1018 posted 14 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 972 posted 15 years ago by kouphax
1 837 posted 15 years ago by Bonky
This makes it easy to retrieve certain value from a url with different values appended to it.
0 742 posted 16 years ago by iTony
Why doesn't this work?
1 552 posted 17 years ago by gaunab
« Prev 1 Next »