On Wed, May 30, 2001 at 10:13:29AM +0300, Ben-Nes Michael wrote:
> Any one know about good search/replace (text) that accept regexp as pattern?

Python has an 're' package and you can get is source - 
it is probably here:

 -rw-r--r-- jhylton/jhylton   15155 Python-2.0/Modules/regexmodule.c
 -rw-r--r-- jhylton/jhylton   46859 Python-2.0/Modules/regexpr.c
 -rw-r--r-- jhylton/jhylton    2332 Python-2.0/Modules/sre.h
 -rw-r--r-- jhylton/jhylton    5598 Python-2.0/Modules/regexpr.h

Tcl's tcl.h has:
..
EXTERN Tcl_RegExp       Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
                            char *string));
EXTERN int              Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
                            Tcl_RegExp regexp, char *string, char *start));
EXTERN int              Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
                            char *string, char *pattern));
EXTERN void             Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
                            int index, char **startPtr, char **endPtr));
..

But then you need to initialize Tcl and its interpreter.
You may try to dig inside the Tcl code.

-- yotam



=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to