Home About Us Services Experience Technology Resources Careers News Contact Us
Mission and Values
Leadership Team
Certifications
Capability Statement
Consulting
Development
Turnarounds
Support
Success Stories
Presentations
Publications
Awards
EDI
RFID
Extranet
Voice and Speech
Natural Language
Handheld and Mobile
Articles and Reference
Code Samples
Downloads
Regular Reading
Email Subscriptions
Services Recommendations
Software Recommendations
Current Opportunities
Careers for Developers
Using Regular Expressions with VFP, with an XMLHTTP Bonus!
The Atlanta FoxPro Users Group - April, 2004

Regular Expressions represent a technology that too few FoxPro developers take advantage of. This presentation will focus on a fast track to make full use of this powerful functionality.

"Never express yourself more clearly than you are able to think." -- Niels Bohr

Regular expressions figure into all kinds of text-manipulation tasks. Searching and search-and-replace are among the more common uses, but regular expressions can also be used to test for certain conditions in a text file or data stream. You might use regular expressions, for example, as the basis for a short program that separates incoming mail from incoming spam. In this case, the program might use a regular expression to determine whether the name of a known spammer appeared in the "From:" line of the email. Email filtering programs, in fact, very often use regular expressions for exactly this type of operation.

Regular expressions trace back to the work of an American mathematician by the name of Stephen Kleene (one of the most influential figures in the development of theoretical computer science) who developed regular expressions as a notation for describing what he called "the algebra of regular sets." His work eventually found its way into some early efforts with computational search algorithms, and from there to some of the earliest text-manipulation tools on the Unix platform (including ed and grep). In the context of computer searches, the "*" is formally known as a "Kleene star."

Regular expressions tend to be easier to write than they are to read. This is less of a problem if you are the only one who ever needs to maintain the program (or sed routine, or shell script, or what have you), but if several people need to watch over it, the syntax can turn into more of a hindrance than an aid.

Downloads
Regular Expression Presentation Demo Code
XMLHTTP Demo Using MapQuest
XMLHTTP Post Round Trip Demo Code

Links
String Parsing in FoxPro Using Regular Expressions
An alternative to the old tedious ways of parsing complex strings.
Password Validation Using Regular Expressions
Simple but powerful way to test for well-formed passwords.
A Tao of Regular Expressions, Steve Mansour
A good explanation, overview and reference for using Regular Expressions.
Regular Expression Library
The Internet's first Regular Expression Library, with hundreds of ranked contributions from around the world.
© The Intellection Group, Inc.  All Rights Reserved
Privacy Statement    Disclaimer