Why didn't work these regular expressions?

Pattern: /(\d,-|\d) (Kčl%)( |\.|,)/
Replacement text: $ $2$3
Test text: 123 % 123 Kč 123,- Kč
OK output: 123 % 123 Kč
KO output (do not work): 123,- Kč

Pattern: / (až|čím|před|při|tím|že) /i
Replacement text:  $1 
Test text: aaa až , čím , před , při , tím , že , Až , Čím , Před , Při , Tím , Že , AŽ , ČÍM , PŘED , PŘI , TÍM , ŽE bbb
OK output: aaa až , čím , před , při , tím , že , Až , Před , Při , Tím ,
KO output (do not work): Čím , Že , AŽ , ČÍM , PŘED , PŘI , TÍM , ŽE bbb

Thank you

Comments

hop’s picture

Why didn't work these regular expressions?

Pattern: /(\d,-|\d) (Kčl%)( |\.|,)/
Replacement text: $1_$2$3
Test text: 123 % 123 Kč 123,- Kč
OK output: 123_% 123_Kč
KO output (do not work): 123,- Kč

Pattern: / (až|čím|před|při|tím|že) /i
Replacement text: _$1_
Test text: aaa až , čím , před , při , tím , že , Až , Čím , Před , Při , Tím , Že , AŽ , ČÍM , PŘED , PŘI , TÍM , ŽE bbb
OK output: _až_,_čím_,_před_,_při_,_tím_,_že_,_Až_,_Před_,_Při_,_Tím_
KO output (do not work): , Čím , Že , AŽ , ČÍM , PŘED , PŘI , TÍM , ŽE ,

Thank you

avpaderno’s picture

Category: bug » support
Status: Needs review » Fixed

This issue queue doesn't give any support for the regular expressions used in the custom filters you create.
If you want to learn more about the regular expressions supported (which are the one supported by PHP), you can check the documentation links reported in the project page.

avpaderno’s picture

Title: Regular expressions » Regular expressions help
Assigned: hop » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.