Need help with correct regex in OSGI | Community
Skip to main content
June 23, 2023
Solved

Need help with correct regex in OSGI

  • June 23, 2023
  • 2 replies
  • 585 views

We are looking for the correct regex pattern to update in OSGI to fetch the config data in component html which are the part of experience fragments

 

eg: /content/expfragment/abc/[REGEX] where it should fetch config from generic exp path

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sady_Rifat

Hello @udayapoornimara ,

The regex you are looking for is 

/content/experience-fragments/(.*)

where it defines, will match any experience fragment path that starts with  /content/experience-fragments/

2 replies

Sady_Rifat
Community Advisor
Sady_RifatCommunity AdvisorAccepted solution
Community Advisor
June 23, 2023

Hello @udayapoornimara ,

The regex you are looking for is 

/content/experience-fragments/(.*)

where it defines, will match any experience fragment path that starts with  /content/experience-fragments/

Tanika02
Level 7
June 23, 2023

Hello @udayapoornimara  - 

 

RegeX : ^/content/expfragment/abc/(.*)

 

  • ^ asserts the start of the string.
  • /content/expfragment/abc/ matches the static part of the path.
  • (.*) captures the remaining part of the path (config data) using a capturing group.