realbasic-nug
[Top] [All Lists]

Re: About RegEx

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: About RegEx
From: Fargo <fargo at rpgportland dot com>
Date: Fri, 31 Aug 2007 02:14:07 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <p06240801c2fd82e9665c at [62 dot 161 dot 36 dot 122]>
RegEx, aka- regular expressions, is a standardized way of searching for 
elements within string data and optionally replacing, extracting, or 
just determining equivalence. As specific to RB, I don't know what 
underlying benefits it may possess, but in general it's an easy way to 
create a really complex string operation, once you know the syntax. 
Regex is available in PHP, perl, python, and I'm sure many others. One 
apparent benefit is that you can write an expression this way and it's 
easily portable to any other language or tool that supports regex. Grep, 
sed, and I'm sure other linux/bsd tools, support it, though there's a 
difference between the current and older standard, as well as some 
differences in some implementations. Still, overall very portable, and 
an easy way to compress a complex search/verify/replace/extract 
operation into either just a few or even a single operation. The 
downside is that it can be a real pain to read later, so comment liberally.

This site, despite being a .info, has some pretty clear information on 
it- http://www.regular-expressions.info/
And this one is informative, kind of fun, and addresses more of the why- 
http://www.troubleshooters.com/linux/presentations/golug_regex/1.html

Good luck,
Fargo

Jean-Luc Arnaud wrote:
> Hello everybody,
>
> I would like to understand what is RegEx, when to use it and why.
>
> If I understand the RB doc, it's a way for manipulating strings : 
> search, replacement, extraction, and so on. Am I right ?
>
> Are RegEx commands more interesting than strings commands ? More 
> powerful or more compatible (cross-platform) ?
>
> Thank you for your help
>
> JLA
> _______________________________________________
>
>   

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>