Welcome To Snipplr


Everyone's Recent Snippets Tagged regex



« Prev 1 2 3 4 5 ... 8
RFC 5322 compliant regex
1 882 posted 5 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 1016 posted 7 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 711 posted 7 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 901 posted 8 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 768 posted 8 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 907 posted 8 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 707 posted 9 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 686 posted 9 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 673 posted 9 years ago by jatubio
Get all links from a website from: http://www.pythonforbeginners.com/code/regular-expression-re-findall
0 1774 posted 9 years ago by tionazo
I simple find to validate a user email address.
0 900 posted 9 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 830 posted 10 years ago by phpdev
I want to extract the numbers from a string that contains numbers and letters like
0 986 posted 10 years ago by satie83
Leading and Trailing Whitespace
0 2374 posted 10 years ago by Pavonz
Removes any lines from the file that don't start with "ERROR"
1 647 posted 10 years ago by gamerzfuse
Use a regex to check the email address input
4 1020 posted 10 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 742 posted 11 years ago by dego89
It removes all standard C-style comments(/* 1-n */) and all single line comments("//"). Greedy matching.
0 883 posted 11 years ago by XtreamIT
ต้องมีอย่างน้อย 8 ตัวอักษร ต้องมีตัวอักษรอังกฤษตัวเล็ก [a-z] และตัวใหญ่[A-Z] อย่างน้อยอย่างล่ะ...
0 668 posted 11 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 754 posted 11 years ago by halk
thanks to... http://gskinner.com/RegExr/ http://daringfireball.net/2010/07/improved_regex_for_matching_urls
1 2028 posted 11 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 648 posted 11 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 627 posted 11 years ago by symsec
Regex code to match hexadecimal colors
0 1371 posted 11 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 582 posted 11 years ago by pumpkinthehead
Formats a 10-digit phone number into a good format (123) 555-1234
0 1160 posted 11 years ago by cpres
« Prev 1 2 3 4 5 ... 8