Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 13.1 ('iOS First Look')
Instant purchase and download via GumRoad!

COLUMN

Literally, Literal Patterns

Turning Arbitrary Strings Into Regular Expression Patterns

Issue: 13.1 (January/February 2015)
Author: Kem Tekinay
Author Bio: Kem Tekinay is a Macintosh consultant and programmer who started with Xojo when it was still REALbasic. He is the author of RegExRX (http://www.mactechnologies.com/index.php:i?page=downloads#regexrx), the popular regular expression editor for Mac and Windows.
Article Description: No description available.
Article Length (in bytes): 11,106
Starting Page Number: 92
Article Number: 13112
Related Web Link(s):

http://www.mactechnologies.com/index.php

Excerpt of article text...

Regular expressions can save you a lot of time and effort, make your code easier to read and maintain, and generally improve your coding life. Literally.

Learn them well and you will become a programming rock star. Literally.

Well, maybe the "rock star" thing is more "figurative," but could you tell the difference? Sure, the first lists things that could happen in a real, measurable sense, whereas the latter is something that represents an idea open to interpretation.

But how do you tell the regular expression engine when to take a pattern literally instead of interpreting it as tokens?

The Unknown Pattern

Suppose you wanted to let your users define a pattern from within your application. For example, they can search a TextArea, but that search will yield entire lines or paragraphs that hold their specified string.

...End of Excerpt. Please purchase the magazine to read the full article.