Welcome To Snipplr
Everyone's Recent JavaScript Snippets Tagged regex
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« Prev 1 Next »
Formats a 10-digit phone number into a good format (123) 555-1234
0
1421
posted 12 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
1051
posted 12 years ago by pumpkinthehead
Modified regex of URL Matcher found on http://daringfireball.net/2010/07/improved_regex_for_matching_urls
0
699
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
889
posted 14 years ago by stryju
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
2951
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
6098
posted 15 years ago by the_coder
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
1223
posted 16 years ago by kouphax
This makes it easy to retrieve certain value from a url with different values appended to it.
0
959
posted 16 years ago by iTony
« Prev 1 Next »