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

Re: regular expressions

In article <3757BAA0.D64AFA37@astro.estec.esa.nl> 
Michael Werger <mwerger@astro.estec.esa.nl> writes:

> for a complex batch processing in IDL I need to do some regular
> expression handling. Of course I can do this like:
> so on. Did anyone already wrote some routines like
> regexp_replace and regexp_match (I think these names are speaking
> for themselves? - like the tcl  routines regsub and regexp?
> Suggestions to improve the above routine are also welcome.

Take a look at the bottom of this page:


They're designed to work with standard unix regcomp/regexec
functions, but see e.g. http://sunland.gsfc.nasa.gov/info/regex/Top.html
for how to use the GNU regular expression library with the same

Of course, regexp_replace can be implemented by replacing
subexpressions and then putting the string together again...


Stein Vidar