[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] What is regex



>From: Roderick Carlson <guiloui@hotmail.com>
>

> As an extreme newbie,
>
> What is a regex?
>


A RegEx (RE or regular expression) is the ability of a
language (say perl for example) to shorten what
would be a usually much longer string manipulation
command into short 'equations', so to speak.

So, instead of saying, say in C:

if ((substr(data,0,4)) == "JAPH") {
   /* Do stuff... */
}


In perl (or any RE aware language) one could say:

do stuff() if /'JAPH'/;


Clearer?
-Sneex-  :]
______________________________________________________________________
Bill Jones  Data Security Specialist  http://www.fccj.org/cgi/mail?dss

==== Want to unsubscribe from this list? (Don't you love us anymore?)
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org