Special

Special Print Closeout!

We're clearing out the remainder of our print issues at fire sale prices -- as much as 75% off! Quantities are extremely limited and only available while supplies last. Hurry to take advantage of this one-time offer.

RBD Magazines

Once these printed back issues are gone, they are gone!

Article Preview


Buy Now

PDF:

Feature

RegEx Revisited

An updated look at REALbasic's Regex classes

Issue: 7.4 (May/June 2009)
Author: JC Cruz
Article Description: No description available.
Article Length (in bytes): 36,268
Starting Page Number: 37
RBD Number: 7413
Resource File(s):

Download Icon 7413.zip Updated: Friday, May 1, 2009 at 11:37 AM

Related Web Link(s):

http://www.rbdeveloper.com/browse/7.4/
http://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/ regexp/regexp.pdf
http://www.tidbits.com/matt/rbd/regex.html
http://en.wikipedia.org/wiki/Regular_expressions

Known Limitations: None

Excerpt of article text...

Today, we take an updated look at regular expressions on REALbasic. First, we learn the concept of a regular expression and how it can serve our needs. Then, we study the basic parts that make up an expression. Next, we examine the three REALbasic classes we need to process a regular expression. We also learn how to use these classes to do a typical search and replace task. And we finish with a step-by-step look at six basic regular expressions.

The Regular Expression

Regular expressions give us the means to describe a specific string pattern. That pattern may be a unique string, or it may be a series of repeating strings. It may describe a part of a much larger string, or a piece of text inside a file.

Regular expressions evolved from an older pattern matching scheme called globbing. If you have worked with command-line shells such as CP/M, DOS, or bash, you will have used globbing in some form. Consider the bash shell, for example. To list all files with a '.log' suffix, type the ls command as shown below.

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

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com