On Sun, 24 Jun 2012 04:35:45 +0200 =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?= wrote:
> I already used testregex. Still no clue why it works there but fails in ksh.

it was a hint to post it :)

post the testregex test case(s) and I'll look at it

> I've reworked the regex the expression below but it still does not
> capture name="value". Full script uploaded to
> http://pastebin.com/raw.php?i=SPyqBMrj
> dummy="${xmltext//~(Ex-p)(?:
>       (<!--.+-->)+?|  # xml comments
>       (<[:_-[:alnum:]]+
>               (?: # attributes
>                       [[:space:]]+
>                       (?:[:_-[:alnum:]]+=[^\"[:space:]]+?)|   #x='foo=bar 
> huz=123'
>                       (?:[:_-[:alnum:]]+=\"[^\"]*?\")|        #x='foo="ba=r 
> o" huz=123'
>                       (?:[:_-[:alnum:]]+=\'[^\']*?\')|        #x="foo='ba=r 
> o' huz=123"
>                       (?:[:_-[:alnum:]]+)                     #x="foox 
> huz=123"
>               )*
>               [[:space:]]*
>               \/?     # start tags which are end tags, too (like <foo\/>)
>       >)+?|                           # xml start tags
>       (<\/[:_-[:alnum:]]+>)+?|        # xml end tags
>       ([^><]+)                        # xml text
>       )/D}"

> Olga

> On Sun, Jun 24, 2012 at 3:35 AM, Glenn Fowler <[email protected]> wrote:
> >
> > On Sat, 23 Jun 2012 21:27:58 -0400 Glenn Fowler wrote:
> >> On Sat, 23 Jun 2012 22:38:36 +0200 =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?= 
> >> wrote:
> >> > I do not see a mistake in the regular expression itself. Either it's a
> >> > hard to spot quoting issue or a full bug in ksh93 or libast regex.
> >
> >> > Glenn, what do you think?
> >
> >> to rule out any possible ksh quoting conflict
> >> express the pattern and subject string as a testregex test
> >> that will make it easy to rule in/out regex itself
> >
> > and if it is regex it will be easier to debug from testregex than ksh
> >

> -- 
>       ,   _                                    _   ,
>      { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
> .----'-/`-/     [email protected]   \-`\-'----.
>  `'-..-| /       http://twitter.com/fleyta     \ |-..-'`
>       /\/\     Solaris/BSD//C/C++ programmer   /\/\
>       `--`                                      `--`

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to