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>
|