Welcome To Snipplr


Everyone's Recent Snippets Tagged regex



« Prev 1 2 3 4 5 ... 8
RFC 5322 compliant regex
1 3551 posted 7 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 3709 posted 9 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 3325 posted 9 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 3716 posted 9 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 3356 posted 10 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 3611 posted 10 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 1373 posted 10 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 2440 posted 10 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 1338 posted 10 years ago by jatubio
Get all links from a website from: http://www.pythonforbeginners.com/code/regular-expression-re-findall
0 4739 posted 10 years ago by tionazo
I simple find to validate a user email address.
0 3646 posted 11 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 2614 posted 12 years ago by phpdev
I want to extract the numbers from a string that contains numbers and letters like
0 2873 posted 12 years ago by satie83
Leading and Trailing Whitespace
0 5310 posted 12 years ago by Pavonz
Removes any lines from the file that don't start with "ERROR"
1 3209 posted 12 years ago by gamerzfuse
Use a regex to check the email address input
4 2866 posted 12 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 2425 posted 12 years ago by dego89
It removes all standard C-style comments(/* 1-n */) and all single line comments("//"). Greedy matching.
0 3463 posted 12 years ago by XtreamIT
ต้องมีอย่างน้อย 8 ตัวอักษร ต้องมีตัวอักษรอังกฤษตัวเล็ก [a-z] และตัวใหญ่[A-Z] อย่างน้อยอย่างล่ะ...
0 2288 posted 12 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 2562 posted 12 years ago by halk
thanks to... http://gskinner.com/RegExr/ http://daringfireball.net/2010/07/improved_regex_for_matching_urls
1 5031 posted 13 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 2300 posted 13 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 2233 posted 13 years ago by symsec
Regex code to match hexadecimal colors
0 4262 posted 13 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 2222 posted 13 years ago by pumpkinthehead
Formats a 10-digit phone number into a good format (123) 555-1234
0 3047 posted 13 years ago by cpres
« Prev 1 2 3 4 5 ... 8