Menu

#1124 Fix regular expressions and operation of the rndgen plugin

Next_Nightly
applied
Patch
2021-08-14
2021-08-06
No

The regular expressions used in the rndgen plugin do not compile with the new PCRE2 library. Worse, with the old (TLC), they compiled but didn't work as intended.

Also, some indexes used with GetMatch() where off-by-one, causing operation errors and a popup about indexes out of range.

The attached patch corrects the regular expressions for PCRE and TLC, calls wxCHECK_RET() instead of assert(), fixes the indexes in the calls to GetMatch(), removes usage of the _T() macro and removes an unexpected text selection after the plugin finishes operation.

1 Attachments

Discussion

  • Miguel Gimenez

    Miguel Gimenez - 2021-08-06

    Patch modified to disable detection of empty strings like ""; /* RANDGEN:ALNUM(10) */, because Replace() does not accept them.

     

    Last edit: Miguel Gimenez 2021-08-06
  • Teodor Petrov

    Teodor Petrov - 2021-08-14
    • labels: plugin, regex --> regex, rgngen
    • status: open --> applied
    • assigned_to: Teodor Petrov
     

Log in to post a comment.