The Un-Official Proxomitron Forum

Full Version: Case sensitive matching
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Guest

How could i make matching case sensitive? I read the docs and I am still clueless.

I know that for HTML case is useless, but once you want to match the text that is withhin the HTML tags it makes perfect sense.
Guest;

In general, Proxo is case-insensitive. But there are times when a text string can fool Proxo, so it's nice to know that you can "force" the issue, so to speak.

In the Proxo language/syntax, you search for a match on a specific letter (or number) by using brackets, like this: [a], or [abc], or [a-s] (to get every lower case letter between a and s, inclusive). You can easily double the letters, like so: [Aa], or [AaBbCc] or [ABCabc], all are equally good.

Of course, there will be a time penalty for all this, each letter will be inspected for every letter coming along the datastream. I suggest strongly that you check your boundaries rigorously before saving your new filter! Also, keep in mind that Proxo will claim "Bingo" for the first match, so consider carefully which desired letters are most likely to come first, upper or lower case.

HTH



Oddysey

Guest

Hello,

it did'nt work for me, it seems that Chracter-classes are also case insensitive.

what im trying to do:

([a-z])\1[I][n]([^a-zA-Z])\2 => \1\2

formerly: ([a-z])\1In([^a-zA-Z])\2 => \1\2

i want to remove the "In" suffix from words.
([^a-zA-Z])\2 is just an ugly workaround for word-bounds since there is no \> or \b (since ccs seem to be insensitive too i think [^a-z] would do the trick as well.

Anyway

([a-z])\1[I][n]([^a-zA-Z])\2

should not match "mein", but thats unfortunately what it does.
Code:
[Patterns]
Name = "Remove "-in" Suffix"
Active = TRUE
Limit = 256
Match = "([a-z])\1in(\s|(^[a-z]))\2"
Replace = "\1\2"

Does this work for you? Smile!
Reference URL's