Reader small image

You're reading from  Learning Boost C++ Libraries

Product typeBook
Published inJul 2015
Reading LevelIntermediate
Publisher
ISBN-139781783551217
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Arindam Mukherjee
Arindam Mukherjee
author image
Arindam Mukherjee

Arindam Mukherjee is a senior principal software engineer at Symantec, Pune, India, where he is involved in the research and development of business continuity solutions for enterprises. He has used C++ extensively for developing large-scale distributed systems. He was a speaker at Dr. Dobb's Journal India Conference 2014 and is the organizer of regular meets for the Pune C++ and Boost Meetup. He believes that writing books and articles, speaking for interest groups, and engaging with the programming community are the best ways to develop a critical understanding of technology. He is also an amateur musician, dabbles in food photography, and loves profound discussions with his 4-year-old daughter, especially about dinosaurs and their diets.
Read more about Arindam Mukherjee

Right arrow

Regular expressions using Boost.Regex


When we write a line of code like boost::find_first("Where have all the flowers gone?", "flowers"), we are asking for the string "flowers" (call it the needle) to be found in the larger string "Where have all the flowers gone?" (call it the haystack). The needle is the pattern; seven specific characters in a particular order whose presence must be looked up in the haystack. Sometimes, however, we don't know the exact string we are looking for; we only have an abstract idea or a pattern in mind. Regular expressions is a powerful language to express this abstract pattern.

Regular expression syntax

Regular expressions are strings that encode a pattern of text using a mix of regular characters and some characters with special interpretation, collectively called metacharacters. The Boost.Regex library provides functions that consume regular expression strings and generate the logic to search and verify text conforming to particular patterns. For example, to...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learning Boost C++ Libraries
Published in: Jul 2015Publisher: ISBN-13: 9781783551217

Author (1)

author image
Arindam Mukherjee

Arindam Mukherjee is a senior principal software engineer at Symantec, Pune, India, where he is involved in the research and development of business continuity solutions for enterprises. He has used C++ extensively for developing large-scale distributed systems. He was a speaker at Dr. Dobb's Journal India Conference 2014 and is the organizer of regular meets for the Pune C++ and Boost Meetup. He believes that writing books and articles, speaking for interest groups, and engaging with the programming community are the best ways to develop a critical understanding of technology. He is also an amateur musician, dabbles in food photography, and loves profound discussions with his 4-year-old daughter, especially about dinosaurs and their diets.
Read more about Arindam Mukherjee