Recent

Author Topic: Wildcards 0.2.0 released  (Read 3462 times)

yamer

  • Jr. Member
  • **
  • Posts: 87
Wildcards 0.2.0 released
« 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

vfclists

  • Hero Member
  • *****
  • Posts: 825
    • HowTos Considered Harmful?
Re: Wildcards 0.2.0 released
« Reply #1 on: August 01, 2014, 11:08:25 am »
How does this compare to  regular expression matching?
Windows - Lazarus 1.0.8/FPC 2.6.0
Linux - Lazarus 1.4.4 /FPC 2.6.4

yamer

  • Jr. Member
  • **
  • Posts: 87
Re: Wildcards 0.2.0 released
« Reply #2 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.


marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7861
Re: Wildcards 0.2.0 released
« Reply #3 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.

Bart

  • Hero Member
  • *****
  • Posts: 3598
    • Bart en Mariska's Webstek
Re: Wildcards 0.2.0 released
« Reply #4 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

yamer

  • Jr. Member
  • **
  • Posts: 87
Re: Wildcards 0.2.0 released
« Reply #5 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.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8141
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Wildcards 0.2.0 released
« Reply #6 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 ;)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Wildcards 0.2.0 released
« Reply #7 on: August 02, 2014, 10:48:43 am »
Re regexpr units included with FPC: see also:
http://wiki.lazarus.freepascal.org/Regexpr
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified