| bpatton 2007-06-19, 7:22 am |
| On Jun 19, 6:23 am, bpatton <bpat...@ti.com> wrote:
> I'm writing in c
> using regex.h
> on a PC.
> using gcc
> using cygwin.
> Here is my string I'm looking for :
> COMMENT = "2A3: ACTIVE perpendicular width where adjacent space is
> ACTIVE space >= 455 = 130"
>
> Here's where I'v compiled the regex.\ that works
> if (regcomp(&rex_comm,"\\s*COMMENT\\s*",REG_EXTENDED|REG_NOSUB|
> REG_ICASE) != 0) {
> ...
>
> }
>
> target PERL style regular expression : ^\\s*COMMENT\\s*=\\s*\"
>
> fails with : ^\\s*COMMENT\\s*
> fails with : \\s*COMMENT\\s*\\=
> fails with : \\s*COMMENT\\s*[=]
>
> I've tried using Regex Coach, but it deals with PERL class regexp and
> it works fine.
also need regex for empty line
in PERL it would be
^\s*$
Don't know about regex.h
|