cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Searching for element name substrings in ACL

ebenton
1-Visitor

Searching for element name substrings in ACL

Maybe I am mistaken and don't know what I am doing (a good possibility), but it seems like wild cards (*) in substr don't work very well when searching for element names. I am trying to search for any elements that contain a given substring in their name, such as "-xyz". What is the correct syntax to use for this in ACL?
For instance, if I were looking for any element that contained the substring "-xyz" in the element name, how would that oid_find_children(), or whatever, function read?

As I have stated before, I am no ACL expert, nor do I play one on TV.
________________________________
2 REPLIES 2
bibach
1-Visitor
(To:ebenton)

Hey, Ed...

Try something like this:

oid_find_children(oid, arr, ".*-xyz.*", 😎

The value 8 for the "flags" argument specifies that the "tag" argument
is a regular expression. The "." matches any character and the "*"
matches zero or more of whatever is right before it.

-Brandon 🙂

ebenton
1-Visitor
(To:ebenton)

Thanks, Brandon.
Announcements

Top Tags