Welcome To Snipplr
Everyone's Recent Snippets Tagged regexp
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Regular Expression to find native Javascript console and AngularJS $log log warn or info that are NOT comments / commented out
1
1089
posted 8 years ago by brandonjp
Match nested html elements using regular expressions.
Replace the first part of the magic "[a-z]+" to search for a specific tag, e.g. "div".
Loop the magic on matched parts to create a recursive match.
1
740
posted 10 years ago by pvq
Gets "src" attributes from all "img" tags in RSS entries descriptions
0
957
posted 11 years ago by alces
Reads CBC news RSS with fancy-prints its in table, splitting news description by image & text.
0
963
posted 11 years ago by alces
thanks to...
http://gskinner.com/RegExr/
http://daringfireball.net/2010/07/improved_regex_for_matching_urls
1
2309
posted 11 years ago by brandonjp
If you don't deal with namespaces in XML correctly they can break your parsing in AS3. One way of getting around this is to remove the namespace from the XML a using regular expression.
0
1064
posted 13 years ago by adrianparr
This simple construct allows you to replace parts of a string with items in a hash table (e.g. and Object).
Example:
var replacements : Object = { SPEED : "slow", ADJECTIVE : "green", VERB: "slithers" };
var template: String = "The %{SPEED}...
0
1035
posted 13 years ago by mgeduld
This can be useful when you retrieve strings from an XML or script that have whitespaces at the beginning or the end.
0
869
posted 13 years ago by gandreini
From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)
1
996
posted 13 years ago by Activetuts
From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)
1
830
posted 13 years ago by Activetuts
From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)
0
867
posted 13 years ago by Activetuts
From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)
1
850
posted 13 years ago by Activetuts
From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)
1
1038
posted 13 years ago by Activetuts
From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)
2
910
posted 13 years ago by Activetuts
From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)
1
920
posted 13 years ago by Activetuts
These five characters should be replaced with their HTML entity names before being used in XML, otherwise they may cause the XML to be invalid.
0
1150
posted 13 years ago by adrianparr