LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Sat, 4 Feb 2012 11:44:47 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
* Bruno Le Floch <[log in to unmask]> [2012-02-03 15:01:01 -0500]:

: Joseph is right. Regular expression matching is already tough enough
: to not try to do it expandably (besides, that would become
: unreasonably slow, and would break in corner cases). What you seem to
: be trying can be done as follows instead:
: 
:     \regex_match:nnTF {o} {o}
:       { \xdef\foo{0,0} }
:       { \xdef\foo{1,1} }

Thanks Bruno. I finally manged to do the parsing correctly. I had to
jump through lots of hoops.

I have a couple of comments about the regex API (overall it's fine).

 o On pages 2--4 I'd give some examples for each of the different
   regular expressions. I've use regular sed expressions a lot but
   I couldn't always understand the perl/POSIX regexpression. In the
   following, I've added a few questions about this.
 o Suggestion: Instead of Quantification, you could consider closure
   (as in .*: Kleene closure).
 o What is the difference between greedy and lazy matching?
 o I think I understand the difference, but it would be nice to
   explain the difference between capturing and non-capturing groups.
 o In the documentation, it is not clear what you mean by <token list>:
   is it a TeX token list or an expl3 token list variable.
 o I really missed a regex_match for matching on an expl3 token list
   argument:)
 o Page 7: zeroeth -> zeroth.

Regards,


Marc van Dongen

ATOM RSS1 RSS2