![](https://secure.gravatar.com/avatar/c4fb1aecd98bbaa9856f8c421db294e0.jpg?s=120&d=mm&r=g)
On Thu, Jun 30, 2005 at 12:06:32PM +0200, Martin Schröder wrote:
On 2005-06-25 03:52:01 +0200, Heiko Oberdiek wrote:
\pdfmatch [icase] [subcount <number>}] {<pattern>}{<string>}
\pdflastmatch <number>
While this is a VERY nice feature, I'm reluctant to include this
This is experimental yet. Currently I am experimenting with "pcre" that is more powerful. Result so far: * changed syntax for \pdflastmatch: \pdflastmatch <general text> Thus keywords can also be used, saving new primitives: * \pdflastmatch{<number>} same semantics as before * \pdflastmatch{match} = \pdflastmatch{0} (perl: $&) * \pdflastmatch{subject} => whole string * \pdflastmatch{prematch} => part before "match" (perl: $`) * \pdflastmatch{postmatch} => part after "match" (perl: $') * \pdflastmatch{last_paren_match} => last substring (perl: $+) * Unclear: options, how they are specified: * \pdfmatch anchored caseless ... {}{} * any order? * alphabetical order for easier/faster scanner? * Or options in separate argument, similar keyval? \pdflastmatch{anchored,caseless,...}{<pattern>}{<subject>} or \pdflastmatch options{...} {<pattern>}{<subject>} * Eventually replace feature.
- I doubt that regex.h is portable; we should keep Windows in mind.
regex: at least it is POSIX. Thus there is a chance that this is
implemented in Windows compileres.
pcre: they say it is possible to compile it under Windows.
Yours sincerely
Heiko