Programming languages - Regular expressions - Techniques

TwitterFacebook
Get flash to fully experience Pearltrees

Using Regular Expressions and Staying Sane

http://www.slideshare.net/carlbrown/using-regular-expressions-and-staying-sane Presentation I gave to the local http://www.cocoacoder.org/ meeting on using Regular Expression in Cocoa code (although much of it applies to other languages as well).
Whether you’ve been searching with Grep or looking at programs that can batch rename files for you, you’ve probably wondered if there was an easier way to get your job done. Thankfully, there is, and it’s called “regular expressions.” Regular expressions are statements formatted in a very specific way and that can stand for many different results. Also known as “regex” or “regexp,” they are primarily used in search and file naming functions. One regex can be used like a formula to create a number of different possible outputs, all of which are searched for. Alternatively, you can specify how a group of files should be named by specifying a regex, and your software can incrementally move to the next intended output. http://www.howtogeek.com/69451/how-to-use-basic-regular-expressions-to-search-better-and-save-time/

How To Use Basic Regular Expressions to Search Better and Save Time - How-To Geek

Below, you will find many example patterns that you can use for and adapt to your own purposes. Key techniques used in crafting each regex are explained, with links to the corresponding pages in the tutorial where these concepts and techniques are explained in great detail. If you are new to regular expressions, you can take a look at these examples to see what is possible.

Regular Expression Examples

http://www.regular-expressions.info/examples.html
Twice a month, we revisit some of our readers’ favorite posts from throughout the history of Nettuts+. Regular Expressions are the Swiss Army knife for searching through information for certain patterns. They have a wide arsenal of tools, some of which often go undiscovered or underutilized. http://net.tutsplus.com/tutorials/php/advanced-regular-expression-tips-and-techniques/

Advanced Regular Expression Tips and Techniques | Nettuts+

Today, we’ll be reviewing the intricacies of regular expressions. More specifically, we’ll discuss both how and why you should use positive/negative lookahead ands lookbehinds in your regular expressions. Originally meant to be a quick tip, this screencast ended up a bit longer than expected, at around eighteen minutes.

How to use Lookaheads and Lookbehinds in your Regular Expressions | Nettuts+

http://net.tutsplus.com/tutorials/other/how-to-use-lookaheads-and-lookbehinds-in-your-regular-expressions/

Ruby for Newbies: Regular Expressions | Nettuts+

http://net.tutsplus.com/tutorials/ruby/ruby-for-newbies-regular-expressions/ Ruby is a one of the most popular languages used on the web. We’ve started a new Session here on Nettuts+ that will introduce you to Ruby, as well as the great frameworks and tools that go along with Ruby development. In this lesson, we’ll look at using regular expression in Ruby. If you’re familiar with regular expressions, you’ll be glad to know that most of the syntax for writing the actual regular expressions is very similar to what you know from PHP, JavaScript, or [your language here]. Just like everything else in Ruby, regular expressions are regular objects: they’re instances of the Regexp class.