(?s)\s|/\*.*?\*/
I've tested with ColdFusion 8 and Railo 3.3.
sCSSContent= sCCSContent.ReplaceAll( "(?s)\s|/\*.*?\*/" , "" );
| <cffunction name= "storeStructIntoSession" | |
| output= "false" | |
| hint= "I store a form into the session scope"> | |
| <cfargument name= "stTarget" | |
| required= "true" | |
| hint= "I am the target struct for storage." /> | |
| <cfargument name= "sSessionKey" | |
| required= "false" |
| # Problem | |
| Find partial valid email address or partial phone number. | |
| # Answer | |
| ^(([\w_]+@))||((\d[\d-]*))$ | |
| It's not a perfect solution, but it'll work for the given test cases. | |
| # Given Test Cases | |
Do not run this against minified JavaScript packages. The minified packages often rely on line returns to execute correctly.
This regular expression was designed to minify simple JavaScript.
(?s)[\t\r\n]|[ ][ ]+|/\*.*?\*/*
I put spaces in square brackets as a reminder that they exist. Spaces can be important. For example, $( "#foo #bar" ) should not become $("#foo#bar"). However, we do want to remove spaces if they are used for indentation.
| <cfdirectory directory= "#ExpandPath( "/src" )#" | |
| name= "qFiles" | |
| filter= "*.java" | |
| recurse= "true" /> | |
| <cfset sOutput= "" /> | |
| <cfloop query= "qFiles"> | |
| <cfset sOutput&= directory & "/" & name & chr( 10 ) /> | |
| </cfloop> |
| <cfscript> | |
| // This gist uses underlying Java to merge arrays. | |
| aOne= [1,2,3]; | |
| aTwo= [4,5,6]; | |
| aMerge= duplicate( aOne ); | |
| aMerge.addAll( aTwo ); | |
| </cfscript> |
| // Useful little function for getting at the guts of DataTables. | |
| var aaSorting= oTable.fnSettings().aaSorting; |
| // Add to callback chain from DataTable.fnDrawCallback, assumes target DataTable is global variable called oTable. | |
| function onDataTableSearchSortAndFilterChangeHandler () { | |
| $( "#sSearch" ).val( | |
| $( ".dataTables_filter label input" ).val() ); | |
| if( typeof( oTable ) === "undefined" ) | |
| return; | |
| var aaSorting= oTable.fnSettings().aaSorting; |
| var sPath= ExpandPath( "/" ); | |
| var qDirectoryList= DirectoryList( sPath , | |
| true , | |
| "query" ); | |
| var qoqDirectoryList= new Query(); | |
| qoqDirectoryList.setAttributes( qDirectoryList= qDirectoryList ); | |
| qoqDirectoryList.setDBType( "query" ); |
| <cffunction name= "grimRequestStructure" | |
| output= "false" | |
| access= "private" | |
| hint= "I convert valid html escaped strings into their code format."> | |
| <cfargument name= "stTarget" /> | |
| <cfargument name= "bDuplicate" | |
| required= "false" | |
| default= "true" |