PHP files

Hello,

We have to manage a batch of PHP.

We have created a new FILE TYPE (sdlftsettings) with regular expressions, but we cannot handle accented characters and apostrophe in French.

How can we do?

Thank you in advance for your help.

 Virginie

Parents
  • Hi ,

    Can you provide some examples of what you are trying to achieve? I'm sure it won't be too hard to achieve if we can have an example.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Hello Paul,

    Thank you for your answer.

    We have move forward but there is problem to settle.

    Thee regex (?s)\\'.*?\;   works but creates a conflict with   (?s)\\.*?   for the backslash of the apostrophes:

     

    --------

    La description adopte la structure suivante :

        array(

            array(\'field\' => \'the_field_name\',

                  \'label\' => \'some visible name\',

                  \'type\' => \'textfield\',

                  \'desc\' => \'some desc\',

                  \'attrs\' => array(\'size\' => 80)),

             array(\'field\' => \'description_sample\',

                   \'label\' => \'Description (sample)\',

                   \'type\' => \'textarea\',

                   \'desc\' => \'Short Description (sample)\'),

             array(\'field\' => \'template_sample\',

                   \'label\' => \'Model (sample)\',

                   \'type\' => \'select\',

                   \'desc\' => \'Course template (sample)\',

                   \'options\' => array(\'MOD1\' => \'Model1\', \'MOD2\' => \'Model2\')));

    L\'expression résultante est :

    -------

     

    Is there a way of handling these?

    Thank you,

Reply
  • Hello Paul,

    Thank you for your answer.

    We have move forward but there is problem to settle.

    Thee regex (?s)\\'.*?\;   works but creates a conflict with   (?s)\\.*?   for the backslash of the apostrophes:

     

    --------

    La description adopte la structure suivante :

        array(

            array(\'field\' => \'the_field_name\',

                  \'label\' => \'some visible name\',

                  \'type\' => \'textfield\',

                  \'desc\' => \'some desc\',

                  \'attrs\' => array(\'size\' => 80)),

             array(\'field\' => \'description_sample\',

                   \'label\' => \'Description (sample)\',

                   \'type\' => \'textarea\',

                   \'desc\' => \'Short Description (sample)\'),

             array(\'field\' => \'template_sample\',

                   \'label\' => \'Model (sample)\',

                   \'type\' => \'select\',

                   \'desc\' => \'Course template (sample)\',

                   \'options\' => array(\'MOD1\' => \'Model1\', \'MOD2\' => \'Model2\')));

    L\'expression résultante est :

    -------

     

    Is there a way of handling these?

    Thank you,

Children