The Un-Official Proxomitron Forum

Full Version: Proxomitron Text Matching
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am Perl programmer. But i still can't understand Prox text matching rules. Please read a quote from Perl documentation:
Quote: The following standard quantifiers are recognized:

* Match 0 or more times
+ Match 1 or more times
? Match 1 or 0 times
{n} Match exactly n times
{n,} Match at least n times
{n,m} Match at least n but not more than m times

(If a curly bracket occurs in any other context, it is treated as a
regular character. In particular, the lower bound is not optional.) The
"*" modifier is equivalent to "{0,}", the "+" modifier to "{1,}", and
the "?" modifier to "{0,1}". n and m are limited to integral values less
than a preset limit defined when perl is built. This is usually 32766 on
the most common platforms. The actual limit can be seen in the error
message generated by code such as this:

$_ **= $_ , / {$_} / for 2 .. 42;

By default, a quantified subpattern is "greedy", that is, it will match
as many times as possible (given a particular starting location) while
still allowing the rest of the pattern to match. If you want it to match
the minimum number of times possible, follow the quantifier with a "?".
Note that the meanings don't change, just the "greediness":

*? Match 0 or more times
+? Match 1 or more times
?? Match 0 or 1 time
{n}? Match exactly n times
{n,}? Match at least n times
{n,m}? Match at least n but not more than m times
How does Prox behave. Are quantified subpatterns 'greedy' or 'greediness'?

First, let me Welcome you to the Forum. We hope you'll like it here, and stick around to contribute to some of the more "intense" discussions on matching expressions. As a PERL man myself, I'm often at loggerheads with others here, and I can use both the moral and technical support! Smile!

If I got the gist of your question correctly, in essence Proxo's matching language matches as often as possible - per filter. The Multiple function is for using more than one filter on a given target string, so don't confuse that ability with some degree of "greediness".

I don't see where Scott built in a limiter such as the question mark to force a singular match, i.e., to skip repeated instances of character sets as they are found within a string. Then again, I could be wrong, as I've never found anything to goad me into trying this trick. Our premier "Filter Factory", sidki3003, will probably chime in RSN, and give us the true story.

In the meantime, can you please give us an example of what you are trying to accomplish? Sometimes when we see things in print, we get a different idea than what we first imagined from just a description.

Hope this helped.

Hi "Guyz",
"Alexx" Welcome to the Forum! Cheers. The Proxo help files are actually pretty good at explaining matching, meta-characters, and commands. Here are some online help files that I use as a reference.

Best Wishes,
"JaK" [smoke]
Reference URL's