Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged regex



« Prev 1 Next »
Use a regex to check the email address input
4 210 posted 7 years ago by dreamstarter
Formats a 10-digit phone number into a good format (123) 555-1234
0 224 posted 8 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 93 posted 8 years ago by pumpkinthehead
0 176 posted 8 years ago by devnull69
{min,max}
0 70 posted 9 years ago by simondiercks
Modified regex of URL Matcher found on http://daringfireball.net/2010/07/improved_regex_for_matching_urls
0 67 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 70 posted 9 years ago by stryju
check the original blogpost for more how-to examples
0 106 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 475 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 465 posted 10 years ago by the_coder
0 92 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 171 posted 11 years ago by kouphax
1 124 posted 11 years ago by Bonky
0 67 posted 12 years ago by wbowers
This makes it easy to retrieve certain value from a url with different values appended to it.
0 98 posted 12 years ago by iTony
Why doesn't this work?
1 67 posted 13 years ago by gaunab
« Prev 1 Next »