17.6: Chapter Summary

Pharo by Example 5.0 · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-SA 3.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    17.6: Chapter Summary

    Regular expressions are an essential tool for manipulating strings in a trivial way. This chapter presented the Regex package for Pharo. The essential points of this chapter are:

    • For simple matching, just send matchesRegex: to a string
    • When performance matters, send asRegex to the string representing the regex, and reuse the resulting matcher for multiple matches
    • Subexpression of a matching regex may be easily retrieved to an arbitrary depth
    • A matching regex can also replace or translate subexpressions in a new copy of the string matched
    • An enumeration interface is provided to access all matches of a certain regular expression
    • Regexes work with streams as well as with strings.

    This page titled 17.6: Chapter Summary was last modified on Sat, 19 Dec 2020 08:13:35 GMT and is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by via source content that was edited to the style and standards of the LibreTexts platform.