Zum Hauptinhalt gehen

How to use the Regular Expression in Section Template HTML Channel?

Kommentare

2 Kommentare

  • Zendesk API User
    Author: sivaprasad9394 - 3/28/2024 6:12

    Hello Team,

    Any one has any idea ? How to implement in First Spirit?

     

     

    HTML Channel:

    $CMS_SET(set_content)$$CMS_VALUE(st_text)$$CMS_END_SET$
    $CMS_SET(compilerPattern)$$CMS_VALUE(class("java.util.regex.Pattern").compile("</ul><br></div>"))$$CMS_END_SET$
    $CMS_SET(matcher)$$CMS_VALUE(class("java.util.regex.Pattern").matcher(set_content.toString().trim()))$$CMS_END_SET$
    $CMS_VALUE((class("java.util.regex.Matcher")matcher))$
    $CMS_IF(matcher.find())$
    $CMS_VALUE("YESSSSSS")$
    $CMS_END_IF$

     

    Thanks n Regards,

    Siva

    0
  • Zendesk API User
    Author: sivaprasad9394 - 3/28/2024 7:01

    Below code is also not working,

    $CMS_IF(set_content.toString().trim().endsWith("</ul><br></div>"))$
    ???? YES
    $CMS_END_IF$

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.