• Complain

Michael Fitzgerald - Introducing Regular Expressions

Here you can read online Michael Fitzgerald - Introducing Regular Expressions full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2012, publisher: OReilly Media, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Michael Fitzgerald Introducing Regular Expressions
  • Book:
    Introducing Regular Expressions
  • Author:
  • Publisher:
    OReilly Media
  • Genre:
  • Year:
    2012
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Introducing Regular Expressions: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Introducing Regular Expressions" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

If youre a programmer new to regular expressions, this easy-to-follow guide is a great place to start. Youll learn the fundamentals step-by-step with the help of numerous examples, discovering first-hand how to match, extract, and transform text by matching specific words, characters, and patterns.

Regular expressions are an essential part of a programmers toolkit, available in various Unix utlilities as well as programming languages such as Perl, Java, JavaScript, and C#. When youve finished this book, youll be familiar with the most commonly used syntax in regular expressions, and youll understand how using them will save you considerable time.

  • Discover what regular expressions are and how they work
  • Learn many of the differences between regular expressions used with command-line tools and in various programming languages
  • Apply simple methods for finding patterns in text, including digits, letters, Unicode characters, and string literals
  • Learn how to use zero-width assertions and lookarounds
  • Work with groups, backreferences, character classes, and quantifiers
  • Use regular expressions to mark up plain text with HTML5

Michael Fitzgerald: author's other books


Who wrote Introducing Regular Expressions? Find out the surname, the name of the author of the book and a list of all author's works by series.

Introducing Regular Expressions — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Introducing Regular Expressions" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Introducing Regular Expressions
Michael Fitzgerald
Published by OReilly Media

Beijing Cambridge Farnham Kln Sebastopol Tokyo Preface This book shows you - photo 1

Beijing Cambridge Farnham Kln Sebastopol Tokyo

Preface

This book shows you how to write regular expressions through examples. Its goal is to make learning regular expressions as easy as possible. In fact, this book demonstrates nearly every concept it presents by way of example so you can easily imitate and try them yourself.

Regular expressions help you find patterns in text strings. More precisely, they are specially encoded text strings that match patterns in sets of strings, most often strings that are found in documents or files.

Regular expressions began to emerge when mathematician Stephen Kleene wrote his book Introduction to Metamathematics (New York, Van Nostrand), first published in 1952, though the concepts had been around since the early 1940s. They became more widely available to computer scientists with the advent of the Unix operating systemthe work of Brian Kernighan, Dennis Ritchie, Ken Thompson, and others at AT&T Bell Labsand its utilities, such as sed and grep , in the early 1970s.

The earliest appearance that I can find of regular expressions in a computer application is in the QED editor. QED, short for Quick Editor, was written for the documents the regex features of QED.)

Ill use a variety of tools to demonstrate the examples. You will, I hope, find most of them usable and useful; others wont be usable because they are not readily available on your Windows system. You can skip the ones that arent practical for you or that arent appealing. But I recommend that anyone who is serious about a career in computing learn about regular expressions in a Unix-based environment. I have worked in that environment for 25 years and still learn new things every day.

Those who dont understand Unix are condemned to reinvent it, poorly. Henry Spencer

Some of the tools Ill show you are available online via a web browser, which will be the easiest for most readers to use. Others youll use from a command or a shell prompt, and a few youll run on the desktop. The tools, if you dont have them, will be easy to download. The majority are free or wont cost you much money.

This book also goes light on jargon. Ill share with you what the correct terms are when necessary, but in small doses. I use this approach because over the years, Ive found that jargon can often create barriers. In other words, Ill try not to overwhelm you with the dry language that describes regular expressions. That is because the basic philosophy of this book is this: Doing useful things can come before knowing everything about a given subject.

There are lots of different implementations of regular expressions. You will find regular expressions used in Unix command-line tools like vi ( vim ), grep , and sed , among others. You will find regular expressions in programming languages like Perl (of course), Java, JavaScript, C# or Ruby, and many more, and you will find them in declarative languages like XSLT 2.0. You will also find them in applications like Notepad++, Oxygen, or TextMate, among many others.

Most of these implementations have similarities and differences. I wont cover all those differences in this book, but I will touch on a good number of them. If I attempted to document all the differences between all implementations, Id have to be hospitalized. I wont get bogged down in these kinds of details in this book. Youre expecting an introductory text, as advertised, and that is what youll get.

Who Should Read This Book

The audience for this book is people who haven't ever written a regular expression before. If you are new to regular expressions or programming, this book is a good place to start. In other words, I am writing for the reader who has heard of regular expressions and is interested in them but who doesnt really understand them yet. If that is you, then this book is a good fit.

The order Ill go in to cover the features of regex is from the simple to the complex. In other words, well go step by simple step.

Now, if you happen to already know something about regular expressions and how to use them, or if you are an experienced programmer, this book may not be where you want to start. This is a beginners book, for rank beginners who need some hand-holding. If you have written some regular expressions before, and feel familiar with them, you can start here if you want, but Im planning to take it slower than you will probably like.

I recommend several books to read after this one. First, try Jeff Friedls Mastering Regular Expressions, Third Edition (see http://shop.oreilly.com/product/9781565922570.do). Friedls book gives regular expressions a thorough going over, and I highly recommend it. I also recommend the Regular Expressions Cookbook (see http://shop.oreilly.com/product/9780596520694.do) by Jan Goyvaerts and Steven Levithan. Jan Goyvaerts is the creator of RegexBuddy, a powerful desktop application (see http://www.regexbuddy.com/). Steven Levithan created RegexPal, an online regular expression processor that youll use in the first chapter of this book (see http://www.regexpal.com).

What You Need to Use This Book

To get the most out of this book, youll need access to tools available on Unix or Linux operating systems, such as Darwin on the Mac, a variant of BSD (Berkeley Software Distribution) on the Mac, or Cygwin on a Windows PC, which offers many GNU tools in its distribution (see http://www.cygwin.com and http://www.gnu.org).

There will be plenty of examples for you to try out here. You can just read them if you want, but to really learn, youll need to follow as many of them as you can, as the most important kind of learning, I think, always comes from doing, not from standing on the sidelines. Youll be introduced to websites that will teach you what regular expressions are by highlighting matched results, workhorse command line tools from the Unix world, and desktop applications that analyze regular expressions or use them to perform text search.

You will find examples from this book on Github at https://github.com/michaeljamesfitzgerald/Introducing-Regular-Expressions. You will also find an archive of all the examples and test files in this book for download from http://examples.oreilly.com/9781449392680/examples.zip. It would be best if you create a working directory or folder on your computer and then download these files to that directory before you dive into the book.

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic

Indicates new terms, URLs, email addresses, filenames, file extensions, and so forth.

Constant width

Used for program listings, as well as within paragraphs, to refer to program elements such as expressions and command lines or any other programmatic elements.

Tip

This icon signifies a tip, suggestion, or a general note.

Using Code Examples

This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless youre reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from OReilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your products documentation does require permission.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Introducing Regular Expressions»

Look at similar books to Introducing Regular Expressions. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Introducing Regular Expressions»

Discussion, reviews of the book Introducing Regular Expressions and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.