Lazarus
Announcements => Third party => Topic started by: yamer on July 31, 2014, 11:53:32 pm
-
Wildcards is a pattern matching unit for Lazarus/Free Pascal.
It provides a Match function to match a pattern against a string. If the pattern must be matched against several strings the unit provides a TWildcard class that is more efficient. Patterns may contain ?, *, [a-z] and other constructions (see documentation of the Match function).
http://yann.merignac.free.fr/unit-wildcards.html (http://yann.merignac.free.fr/unit-wildcards.html)
-
How does this compare to regular expression matching?
-
Wildcards are less powerful then regexp. But wildcards are simpler to read and write (which is very important if an end user as to use them). And they don't need to link to external library.
-
Pascal has two regex units with native implementations built in.
That being set I usually use wildcard functions for base operations too. Quicker, simpler tighter, and enough for most cases.
-
It seems to do what Masks unit does already.
Also: does it work correct with UTF-8 input?
Bart
-
@marcov
:o I always thought that Free Pascal regex units are only bindings to some system libraries.
Good to know.
@Bart
No, there is no UTF-8 support.
-
@marcov
:o I always thought that Free Pascal regex units are only bindings to some system libraries.
Good to know.
You should always check the source directly without assuming anything. Assumption only applies to closed souce ;)
-
Re regexpr units included with FPC: see also:
http://wiki.lazarus.freepascal.org/Regexpr