Skip to main content
1-Visitor
February 15, 2010
Question

Searching for element name substrings in ACL

  • February 15, 2010
  • 2 replies
  • 726 views
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

    1-Visitor
    February 15, 2010
    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 🙂

    ebenton1-VisitorAuthor
    1-Visitor
    February 15, 2010
    Thanks, Brandon.