[comp.lang.c] Regular Expressions HELP needed

steed@media01.UUCP (Aristides Grigoriou) (12/03/90)

Could somebody help please !!

In these times where standarisation is a much used word.
I run in to a problem which must be solved many times before.

The problem is: I want to use the regular expression handler
from the C-library(SYS V: libform.a). So far so good, but it has
to work on different platforms. For the moment SYS V 3.2 and SunOS 4.01.
I need this in an OO-application. Most objects have a different RE stored
in them.

Since SunOs and SYS V handle regular expressions completly different
I want to know:

	  - Is there uniform way of solving this ?
	    ( I don't like #ifdef's )
	    ( And I certainly don't want two versions )
	
	  - Is there maybe another standard Lib ?

	  - Are RE's standarised (POSIX,ANSI maybe) ?

          - Or must I just every time when I want to use
	    an RE "compile" it before I can 'regex' or 're_exec' ?
	    ( This is very expensive I think )


I will give a summary of the reactions.


                          Thanks in advance,

			  Aristides Grigoriou

P.S. Email reactions can best be send to hp4nl!media01!steed 
     Lately some mail gets lost via the other address

--
.-----------------+------------------------------+---------------------------.
| Aristides       | EMAIL: steed@media01.UUCP    | _________________________ |
|     Grigoriou   |       ...!hp4nl!media01!steed| ||       ||            || |
| "Steed"      ---:->"Miss Peel, we're needed .."| ||       ||               |
| Mediasystemen   |                              | |=========|           ====|
| P.O.box 4932    |                              | ||       ||            || |
| 2003 EX Haarlem | VOICE: +31-23-315210         | ||       ||            || |
| The Netherlands | FAX  : +31-23-315210         | ||       ||____________|| |
`-----------------+------------------------------+---------------------------'

poser@csli.Stanford.EDU (Bill Poser) (12/03/90)

I always use Henry Spencer's regular expression code.
This solves the portability problem, and is often an enhancement to
boot as the library functions on many systemsdo nott hndle
full regular expressions.

gwyn@smoke.brl.mil (Doug Gwyn) (12/03/90)

In article <1578@media01.UUCP> steed@media01.UUCP (Aristides Grigoriou) writes:
>	  - Is there uniform way of solving this ?

Yes; provide your own routines for handling REs.

henry@zoo.toronto.edu (Henry Spencer) (12/04/90)

In article <1578@media01.UUCP> steed@media01.UUCP (Aristides Grigoriou) writes:
>	  - Are RE's standarised (POSIX,ANSI maybe) ?

POSIX 1003.2 is going to include some RE standardization.  As of the last
draft, it is going to resemble my regexp routines a whole lot more than
it resembles the abortions found in SysV and BSD.  I know of no current
implementation that exactly matches the POSIX stuff, however.
-- 
"The average pointer, statistically,    |Henry Spencer at U of Toronto Zoology
points somewhere in X." -Hugh Redelmeier| henry@zoo.toronto.edu   utzoo!henry