[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: search/replace with regexp
- To: Ben-Nes Michael <miki(at-nospam)canaan.co.il>
- Subject: Re: search/replace with regexp
- From: Yotam Medini <ymedini(at-nospam)iil.intel.com>
- Date: Wed, 30 May 2001 10:43:53 +0300
- Cc: linux-il(at-nospam)linux.org.il
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: <006e01c0e8d8$072ddcc0$aa5796d4@canaan.co.il>; from miki@canaan.co.il on Wed, May 30, 2001 at 10:13:29AM +0300
- References: <006e01c0e8d8$072ddcc0$aa5796d4@canaan.co.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
- User-Agent: Mutt/1.2i
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 linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il