Introduction toRegular Expressions
Matt Casto
http://google.com/profiles/mattcasto
Introduction toRegular Expressions
Matt Casto
Quick Solutions
http://google.com/profiles/mattcasto
“Some people, when confronted with a problem, think “I know, I'll use regular expressions. Now they have two problems.”
- Jamie Zawinski, August 12, 1997
What are Regular Expressions?
^w+@[a-zA-Z_]+?.[a-zA-Z]{2,3}$
[w-]+@([w-]+.)+[w-]+
^.+@[^.].*.[a-z]{2,}$
^([a-zA-Z0-9_-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([a-zA-Z0-9-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$
History
Stephen Cole Kleene
American mathematician credited for inventing Regular Expressions in the 1950’s using a mathematic notation called regular sets.
History
Ken Thompson
American pioneer of computer science who, among many other things, used Kleene’s regular sets for searching in his QED and ed text editors.
History
grep
Global Regular Expression Print
History
Henry Spencer
Wrote the regex library which is what Perl and Tcl languages used for regular expressions.
Why Should You Care?
Example: finding duplicate words in a file.
Requirements:
Output lines that contain duplicate words Find doubled words that expand lines Ignore capitalization differences Ignore HTML tags
Output lines that contain duplicate words
Find doubled words that expand lines
Ignore capitalization differences
Ignore HTML tags
Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...
In this presentation we will describe our experience developing with a highly dyna...
Presentation to the LITA Forum 7th November 2014 Albuquerque, NM
Un recorrido por los cambios que nos generará el wearabletech en el futuro
Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...
Microsoft finally joins the smartwatch and fitness tracker game by introducing the...
Regular expressions are a pattern matching standard for string parsing and replacement. They are used on a wide range of platforms and programming ...
Read more
Introduction. Regular expressions are awesome. Regular expressions are confusing. They are used widely to match certain patterns of strings within another ...
Read more
Regular Expressions. Explains the concept of regular expressions by comparing with concepts that are already familiar to most readers. Uses for Regular ...
Read more
Introduction. We already mentioned what Regular Expressions are. With Regular Expressions (from now, RegExp), you can "match" non fixed text strings.
Read more
MSDN subscriptions. Get tools. Technologies. Cloud; App Development; Web; Data; Gaming
Read more
Introduction to regular expressions provides you with in-depth training on IT. Taught by Kevin Skoglund as part of the Unix for Mac OS X Users
Read more
So, using that simple strategy, let’s get started! String Literals. The very first thing we’ll learn how to do is match for a literal string.
Read more
Introduction to regular expressions provides you with in-depth training on Developer. Taught by Simon Allardice as part of the Foundations of Programming ...
Read more
Introduction to regular expressions | Learn the regular expression syntax ... A regular expression is a special text string for describing a search pattern.
Read more
Add a comment