On Mon, 18 Jun 2012 17:12:24 +0200 =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?= wrote:
> Glenn, how does the egrep pattern below look like if I want a xgrep
> pattern instead?
> ----- cutme ----
> xmltext='<h1><div> a text </div><!-- a comment (<disabled>) --></h1>'

> dummy="${xmltext//~(Ex-g)(?:
> #     (<!--.+-->)|   # xml comments
>       (<.+>)|  # xml tags
>       ([^[><]]+)     # xml text
>       )/dummy}"
> print -v .sh.match
> ----- cutme ----

in this case xgrep patterns would look worse because <>! are metachars
that would have to be escaped outside of [...] to be literal

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

Reply via email to