Can we add regex in query builder's path? | Community
Skip to main content
Level 2
Oct 16, 2015 2:29 AM UTC
Solved

Can we add regex in query builder's path?

HI,

I have a query where in need to add regex in the query builder's path property Like: path: /a/b/c/*/d, where my node structure at * is changing.

Is there a way to do this?

 

Also, is there a way where i can add groups inside group and put and/or conditions?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
BrianKasingli
BrianKasingliAccepted solution
New Participant
Jul 26, 2023 11:51 PM UTC

Regular expressions are not natively supported in AEM Query Builder. However, you can still achieve some basic pattern matching using wildcards.

{ "path": "/content/mysite/en/", "type": "cq:Page", "property": "jcr:title", "property.value": "page*", "property.operation": "like" }

In this example, we use "property.value": "page*" with the "like" operation. The * wildcard allows for any characters to come after "page." This will match nodes with titles like "page1," "page2," etc., under the path /content/mysite/en/.

1 reply

BrianKasingli
BrianKasingliAccepted solution
New Participant
Jul 26, 2023 11:51 PM UTC

Regular expressions are not natively supported in AEM Query Builder. However, you can still achieve some basic pattern matching using wildcards.

{ "path": "/content/mysite/en/", "type": "cq:Page", "property": "jcr:title", "property.value": "page*", "property.operation": "like" }

In this example, we use "property.value": "page*" with the "like" operation. The * wildcard allows for any characters to come after "page." This will match nodes with titles like "page1," "page2," etc., under the path /content/mysite/en/.

Translate