Recent

Author Topic: Examples for the RegularExpressions unit  (Read 909 times)

Roland57

  • Hero Member
  • *****
  • Posts: 605
    • msegui.net
Examples for the RegularExpressions unit
« on: March 14, 2025, 10:27:16 am »
Hello everybody!

I learnt by reading a recent discussion that FPC has now a RegularExpressions unit. So I retouched the examples that I had written for this tutorial, to make them compilable with FPC.

All the examples are available here.

All examples work as expected, excepted three (see BUGS).
My projects are on Codeberg.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Examples for the RegularExpressions unit
« Reply #1 on: March 14, 2025, 11:25:20 am »
I mixed up regular expression engines that are part of FPC. Original post content removed.
« Last Edit: March 14, 2025, 12:03:05 pm by TRon »
Today is tomorrow's yesterday.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12838
  • FPC developer.
Re: Examples for the RegularExpressions unit
« Reply #2 on: March 14, 2025, 11:34:21 am »
(I think Roland is not refering to regexpr, but System.Regularexpressions in vcl-compat in trunk that uses PCRE2 as regex engine)

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Examples for the RegularExpressions unit
« Reply #3 on: March 14, 2025, 12:01:37 pm »
Drats. I think you are correct Marco, thank you for the warning.

I'll adjust my previous post.
Today is tomorrow's yesterday.

Roland57

  • Hero Member
  • *****
  • Posts: 605
    • msegui.net
Re: Examples for the RegularExpressions unit
« Reply #4 on: March 14, 2025, 12:21:18 pm »
Yes, I meant RegularExpressions unit from vcl-compat package, as Marco said.
My projects are on Codeberg.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Examples for the RegularExpressions unit
« Reply #5 on: March 14, 2025, 12:26:34 pm »
Yeah, sorry for that Roland57.

Sometimes a response from me is just as the result from a regular expression: completely illogical and messed up  :D

The general gist however stands: Fixes are slow to find its way back to a release so please report in case something is wrong and thank you for checking/testing.
Today is tomorrow's yesterday.

Roland57

  • Hero Member
  • *****
  • Posts: 605
    • msegui.net
Re: Examples for the RegularExpressions unit
« Reply #6 on: March 14, 2025, 12:51:28 pm »
Yeah, sorry for that Roland57.

There is nothing to be sorry about.  ;)

Sometimes a response from me is just as the result from a regular expression: completely illogical and messed up  :D

 :)

The general gist however stands: Fixes are slow to find its way back to a release so please report in case something is wrong and thank you for checking/testing.

Until now, I have three examples that crash, but I don't know whether the fault is in the unit or in my code. I have an example that doesn't give the expected result. The Unicode examples have been fixed. Yes, I will make a report when I have finished testing.
My projects are on Codeberg.

 

TinyPortal © 2005-2018