Need help with correct regex in OSGI | Community
Skip to main content
New Participant
Jun 23, 2023 12:42 PM UTC
Solved

Need help with correct regex in OSGI

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.
Sady_Rifat
Sady_RifatAccepted solution
New Participant
Jun 23, 2023 12:57 PM UTC

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

Tanika02
Level 7
Jun 23, 2023 1:46 PM UTC

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. 
Translate
Sady_Rifat
Sady_RifatAccepted solution
New Participant
Jun 23, 2023 12:57 PM UTC

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/

Translate