Lazarus

Announcements => Third party => Topic started by: yamer on July 31, 2014, 11:53:32 pm

Title: Wildcards 0.2.0 released
Post 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)
Title: Re: Wildcards 0.2.0 released
Post by: vfclists on August 01, 2014, 11:08:25 am
How does this compare to  regular expression matching?
Title: Re: Wildcards 0.2.0 released
Post by: yamer on August 01, 2014, 11:40:09 am
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.

Title: Re: Wildcards 0.2.0 released
Post by: marcov on August 01, 2014, 02:30:22 pm
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.
Title: Re: Wildcards 0.2.0 released
Post by: Bart on August 01, 2014, 03:02:51 pm
It seems to do what Masks unit does already.
Also: does it work correct with UTF-8 input?

Bart
Title: Re: Wildcards 0.2.0 released
Post by: yamer on August 02, 2014, 12:08:22 am
@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.
Title: Re: Wildcards 0.2.0 released
Post by: Leledumbo on August 02, 2014, 10:35:11 am
@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 ;)
Title: Re: Wildcards 0.2.0 released
Post by: BigChimp on August 02, 2014, 10:48:43 am
Re regexpr units included with FPC: see also:
http://wiki.lazarus.freepascal.org/Regexpr
TinyPortal © 2005-2018