Author Topic: Filters documentation?  (Read 6576 times)

DietCoke

  • Full Member
  • ***
  • Posts: 25
    • View Profile
Filters documentation?
« on: March 12, 2015, 09:30:18 PM »
I've come across some info here:

https://github.com/mickelson/attract/wiki/Example-filters

Is there any other resource for filter information?  I'd like to build some but more info out there would be great.  I generally just slash my way through code, bastardize it and then criticize it :) 

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: Filters documentation?
« Reply #1 on: March 12, 2015, 11:31:28 PM »
Cools had a couple examples as well:

http://forum.arcadecontrols.com/index.php/topic,135704.msg1416194.html#msg1416194

Is there something you don't understand, or just wanting more examples?

DietCoke

  • Full Member
  • ***
  • Posts: 25
    • View Profile
Re: Filters documentation?
« Reply #2 on: March 13, 2015, 09:45:59 AM »
Thanks Liquid for the link!

This is luckily one of the items that I'm actually looking to figure out vs. chasing something I've misconfigured!  Documentation / organized chaos like this, perhaps?

https://www.autoitscript.com/autoit3/docs/functions.htm

Luckily it doesn't look like filtering is as complex as hacking apart Autoit code!
« Last Edit: March 13, 2015, 09:53:19 AM by DietCoke »

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: Filters documentation?
« Reply #3 on: March 30, 2015, 10:52:52 PM »
Filters are simply doing pattern matching using the squirrel library's regular expressions (bugs and all).  So the squirrel documentation, particularly this: http://www.squirrel-lang.org/doc/sqstdlib3.html#d0e2183 will be of some help too.



\   Quote the next metacharacter
^   Match the beginning of the string
.   Match any character
$   Match the end of the string
|   Alternation
(subexp)   Grouping (creates a capture)
(?:subexp)   No Capture Grouping (no capture)
[]   Character class

GREEDY CLOSURES.

*   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
ESCAPE CHARACTERS.

\t   tab (HT, TAB)
\n   newline (LF, NL)
\r   return (CR)
\f   form feed (FF)

PREDEFINED CLASSES.

\l   lowercase next char
\u   uppercase next char
\a   letters
\A   non letters
\w   alphanumeric [_0-9a-zA-Z]
\W   non alphanumeric [^_0-9a-zA-Z]
\s   space
\S   non space
\d   digits
\D   non nondigits
\x   exadecimal digits
\X   non exadecimal digits
\c   control charactrs
\C   non control charactrs
\p   punctation
\P   non punctation
\b   word boundary
\B   non word boundary