Expand my Community achievements bar.

SOLVED

Need help with correct regex in OSGI

Avatar

Level 1

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

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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/

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

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/

Avatar

Level 10

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.