Welcome To Snipplr


Everyone's Recent Snippets Tagged regex



« Prev 1 2 3 4 5 ... 8
RFC 5322 compliant regex
1 121 posted 2 years ago by cyrilfr
Renames all the files in the working directory from given regex pattern, in this case removes a series of digits (e.g. \_0004\_) that Photoshop appends when exporting layers.
1 140 posted 3 years ago by evito
* Usefull as shell command and everyting else `get-ip='egrep -o "[0-9]{1,4}\.[0-9]{1,4}\.[0-9]{1,4}\.[0-9]{1,4}"'` `get-ipport='egrep -o "[0-9]{1,4}\.[0-9]{1,4}\.[0-9]{1,4}\.[0-9]{1,4}[0-9 :]+" | sed -e "s/ //g"'`
0 105 posted 4 years ago by dbiesecke
Regular Expression to find native Javascript console and AngularJS $log log warn or info that are NOT comments / commented out
1 125 posted 4 years ago by brandonjp
[The original problem was stated as a SQL (SQL Server 2008) problem. This Perl script demonstrates the desired outcome for the problem statement.] PROBLEM STATEMENT: Please help me with SQL Query and requirement is as below: Below is the Da...
0 107 posted 5 years ago by bvwatson
Uses regular expressions to do string manipulation. Enter a regular expression into the required parameter and what you want the manipulation to do and it will process the string manipulation. For example if A1 contains John Doe1, Jane Doe2, John W...
2 91 posted 5 years ago by BDOGG32
Search and returns the first results on a regex search If we use parenthesized or subpattern, can return with $result_number
0 109 posted 5 years ago by jatubio
Build a regex expression to all array elements are present in any order. Gets an array of strings (Sample: array("Access Denied","error","could not be retrieved") Return sample: '(?=.*Access Denied)(?=.*error)(?=.*could not be retrieved)
0 115 posted 5 years ago by jatubio
Replaces spaces by '\s+' which means one or more spaces $string can be one string or one array of strings
0 103 posted 5 years ago by jatubio
Get all links from a website from: http://www.pythonforbeginners.com/code/regular-expression-re-findall
0 261 posted 5 years ago by tionazo
I simple find to validate a user email address.
0 108 posted 5 years ago by dreamstarter
**Example of use:** if (!isUniversityEmail('[email protected]')) exit('You must have a valid and .edu email address to register for an account.');
1 130 posted 6 years ago by phpdev
I want to extract the numbers from a string that contains numbers and letters like
0 237 posted 7 years ago by satie83
Leading and Trailing Whitespace
0 437 posted 7 years ago by Pavonz
Removes any lines from the file that don't start with "ERROR"
1 84 posted 7 years ago by gamerzfuse
Use a regex to check the email address input
4 209 posted 7 years ago by dreamstarter
The following code retrieves a list of content based on a taxonomy id. The list is bound to a repeater that display a preview of the content with a quick link to a content page. The content comes in based on the previous taxonomy id but exposes a con...
0 102 posted 7 years ago by dego89
It removes all standard C-style comments(/* 1-n */) and all single line comments("//"). Greedy matching.
0 102 posted 7 years ago by XtreamIT
ต้องมีอย่างน้อย 8 ตัวอักษร ต้องมีตัวอักษรอังกฤษตัวเล็ก [a-z] และตัวใหญ่[A-Z] อย่างน้อยอย่างล่ะ...
0 86 posted 7 years ago by gaserland
https://gist.github.com/4098493 (examples of use below the class code) This class allows you to load a file of snippets that are really mini-templates copy them from your repository fill the token slots in them the with your data and render them as...
0 123 posted 7 years ago by halk
thanks to... http://gskinner.com/RegExr/ http://daringfireball.net/2010/07/improved_regex_for_matching_urls
1 239 posted 7 years ago by brandonjp
As portrayed by the example found in the [Advanced Bash Scripting guide](http://tldp.org/LDP/abs/html/here-docs.html) this demonstrates a few techniques
0 85 posted 7 years ago by symsec
As portrayed by the example found in the [Advanced Bash Scripting guide](http://tldp.org/LDP/abs/html/here-docs.html) this demonstrates a few techniques
0 78 posted 7 years ago by symsec
Regex code to match hexadecimal colors
0 188 posted 8 years ago by guilhermehn
A regular expression for removing <br> and <br> (case insensitive) between HTML elements if there is no content between the HTML elements. It was written for fixing extra line spaces created in a WordPress visual editor after the content of the visu...
0 87 posted 8 years ago by pumpkinthehead
Formats a 10-digit phone number into a good format (123) 555-1234
0 220 posted 8 years ago by cpres
« Prev 1 2 3 4 5 ... 8