© Jörg Krause 2017

Jörg Krause, Introducing Regular Expressions, 10.1007/978-1-4842-2508-0_2

2. Recognizing Patterns

Jörg Krause

(1)Berlin, Germany

In this chapter, I’m going to show basic techniques using simple examples. This is probably not enough for daily use, but it’s a good basis for your own experiments.

Basics

What happens if an expression is being evaluated? Actually it’s always the goal to search a text portion within another, often larger, text. The text searched may come from a formula, a file, a database, or it may be just a string. But that’s not the point. You can use a simple search function for that, and most often, such a simple search is more efficient. Regular expressions define properties within the search text. That way, you ...

Get Introducing Regular Expressions: JavaScript and TypeScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.