Re: Query on pattern matching

2007-03-09 Thread Rob Dixon
Dharshana Eswaran wrote: On 3/9/07, John W. Krahn <[EMAIL PROTECTED]> wrote: Chas Owens wrote: [snip] ( \w+ | \d+ | 0x[a-fA-F0-9] That only matches a single hexadecimal digit, you probably want 0x[a-fA-F0-9

Re: Query on pattern matching

2007-03-08 Thread Dharshana Eswaran
On 3/9/07, John W. Krahn <[EMAIL PROTECTED]> wrote: Chas Owens wrote: > On 3/8/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: >> >> I need to extract few strings from one file and paste it to another file. > snip > > This doesn't seem like a good job for split. The split function is > good fo

Re: Query on pattern matching

2007-03-08 Thread John W. Krahn
Chas Owens wrote: > On 3/8/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: >> >> I need to extract few strings from one file and paste it to another file. > snip > > This doesn't seem like a good job for split. The split function is > good for parsing X separated records where X is either consta

Re: Query on pattern matching

2007-03-08 Thread Rob Dixon
Dharshana Eswaran wrote: Hi all, I need to extract few strings from one file and paste it to another file. My source file, i.e., my .h file, contains statements like: #define GMMREG_ATTACH_REQ_ID (GMMREG_PRIM_ID_BASE) /* @LOG GMMREG_ATTACH_REQ */ #define GMMREG_DETACH

Re: Query on pattern matching

2007-03-08 Thread Chas Owens
On 3/8/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: Hi all, I need to extract few strings from one file and paste it to another file. snip This doesn't seem like a good job for split. The split function is good for parsing X separated records where X is either constant or simple. What yo