beginning regular expressions (programmer to programmer)

771 1.4K 0
beginning regular expressions (programmer to programmer)

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... strengths and pitfalls of regular expressions Who This Book Is For Beginning Regular Expressions is designed for developers who need to manipulate text but are new to regular expressions or have tried regular expressions in the past but have found that the learning curve, presented by experts who didn’t realize the needs of newcomers to the topic, was just too steep to allow them to make progress This... how to make regular expressions do what you want them to do and avoid creating regular expressions that don’t meet your intentions Beginning chapters introduce regular expressions and show you a method you can use to break down a text manipulation problem into component parts so that you can make an intelligent choice about constructing a regular expression pattern that matches what you want it to match... adapt to allow you to explore solutions to the problems that you meet Whether you are an occasional programmer or simply one who hasn’t used regular expressions yet, you will be shown the component parts of regular expressions, what they mean, how to use them, and pitfalls to be aware of when using them Working examples form a core part of how you learn to create, understand, and use regular expressions. .. Approach to Using Regular Expressions 31 Express and Document What You Want to Do in English Consider the Data Source and Its Likely Contents Consider the Regular Expression Options Available Consider Sensitivity and Specificity Create Appropriate Regular Expressions Document All but Simple Regular Expressions 32 34 34 34 35 35 Document What You Expect the Regular Expression to Do Document What You Want to. .. their primary or only operating system You won’t need to spend time understanding aspects of Unix to begin to use regular expressions All of the tools and languages presented in this book run on Windows, although versions of many are available that will run on other platforms too Beginning Regular Expressions takes you forward from things you are likely to know already, such as the use of the * and ? characters... text To solve more complex problems, I encourage you to set out a problem definition and progressively refine it to express it in English in a way that corresponds to a regular expression pattern that does what you want it to do The second part of the book devotes a chapter to each of several technologies available on the Windows platform You are shown how to use each tool or language with regular expressions. .. that it conforms to the rules of Extensible Markup Language (XML) syntax and complies with company policy to use XHTML code You might want to check that user input into a Windows application satisfies necessary criteria to allow correct processing In this chapter, you will learn the following: ❑ What regular expressions are ❑ What regular expressions can be used for ❑ Why regular expressions can seem... 1-2 4 Introduction to Regular Expressions Don’t worry too much about the syntax for matching the positions at the beginning and end of words for the moment You’ll see the various forms of syntax for that in Chapter 6 What Can Regular Expressions Be Used For? The potential number of uses for regular expressions is enormous This section briefly describes some examples of what regular expressions can be... break regular expressions down into their component parts and think carefully about what you want them to achieve for you, they can become a very useful tool, in fact an essential tool, in your developer skillset This book aims to help you overcome the hurdles that make so many developers uncomfortable with regular expressions and allow you to make effective use of the power that is available to the developer... a tool that allows the manipulation of text is almost endless, with text being so widespread Sadly, many computer users and developers have little or no knowledge of regular expressions and how they can help in working with text This book aims to change that What Are Regular Expressions? Regular expressions are patterns of characters that match, or fail to match, sequences of characters in text To . Need to Use This Book xxiii Conventions xxiii Source Code xxiv Errata xxiv p2p.wrox.com xxv Chapter 1: Introduction to Regular Expressions 1 What Are Regular Expressions? 2 What Can Regular Expressions. Want to Do with a Regular Expression 17 The Languages That Support Regular Expressions 17 Replacing Text in Quantity 17 Chapter 2: Regular Expression Tools and an Approach to Using Them 21 Regular. Editor Jim Minatel Development Editor Marcia Ellett Technical Editors Douglas J. Steele Darren Neimke Production Editor Felicia Robinson Copy Editor Jeri Freedman/Foxxe Editorial Services Editorial

Ngày đăng: 01/06/2014, 00:37

Từ khóa liên quan

Mục lục

  • Beginning Regular Expressions

    • Cover

    • Content

    • Introduction

      • Who This Book Is For

      • What This Book Covers

      • How This Book Is Structured

      • What You Need to Use This Book

      • Conventions

      • Source Code

      • Errata

      • p2p.wrox.com

      • Chapter 1: Introduction to Regular Expressions

        • What Are Regular Expressions?

        • What Can Regular Expressions Be Used For?

          • Finding Doubled Words

          • Checking Input from Web Forms

          • Changing Date Formats

          • Finding Incorrect Case

          • Adding Links to URLs

          • Regular Expressions You Already Use

            • Search and Replace in Word Processors

            • Directory Listings

            • Online Searching

            • Why Regular Expressions Seem Intimidating

              • Compact, Cryptic Syntax

Tài liệu cùng người dùng

Tài liệu liên quan