The Policy Hub allows you to automatically identify specific content, media, or documents across your web pages. Within the hub, you can create policies with customized rules to locate elements site-wide.
Creating a policy
- Log into YuJa EqualGround as an admin.
- Hover over the left side navbar and select Policy Hub.
- Click Add Policy.
-
Under What Should It Check?, select a desired policy type among Content, Media, and Document. For more information on policy types, please refer to Understanding policy types.
- Enter the Policy Name, and select its priority in the Priority field: High, Medium, or Low. Priorities help you quickly identify the most important policies in the Policy List.
-
Click + Add Rule to add rules to your policy.
-
Select a rule from the Check drop-down menu, and a match condition from the Condition drop-down menu.
- (Optional) To add more rules to your policy, click + Add Rule. You can add as many rules as you require. Then, locate and select the AND/OR connector between your rules:
- AND: Only identify content that matches both rules.
- OR: Identify content that matches either one of the rules.
-
Click Continue.
- Tick the checkbox for the website you want to add this policy to.
-
Click Create Policy.
Applying the AND/OR connectors to your policy
Below are some case examples of how to use the AND/OR connectors.
Using AND connectors for all rules
Use the AND connector to return items matching both adjacent rules. When you use multiple AND connectors in a row, all connected rules must be true for items to be retrieved. In this example, it will identify all the image and video files that are greater than 50 MB on your selected website.
Using OR connectors for all rules
Use the OR connector to return items that match any of the rules you add. In this example, it will identify all image files, video files, or any media files that are greater than 50 MB on your selected website.
Using AND and OR connectors for rules
With AND and OR connectors, you can create flexible search conditions that require only one of the conditions to be true. In your first condition, you can connect two rules by using an AND connector. Then, add a second condition using the OR connector.
In this example, the policy will identify content if it is an image file or a video file that is greater than 50 MB.
Using regex in rules
A regex is a text string that can be used to create powerful rules to find, filter, or flag specific content on your website. Regex can be used as a Condition for the following text-based rule types:
- Content Match
- HTML Match
- Link Match
- Media File Name
- Image Alt Text
- Document Name
In this example, the policy will identify text with “abc” that is immediately followed by exactly three digits.
Applying regex to your policy
The table below includes some of the most common regex policies.
Search Goal |
Regex Policy |
Example Match Value |
| Literal Dot | \. |
Matches a literal period. |
| Exclude Digits | [^0-9]+ |
Matches any text that does not contain numbers. |
| Emojis/Astral Symbols | \uD83D\uDE00 |
Matches the 😀 emoji specifically. |
| Exact String | ^Regex Policy Page$ |
Matches only "Regex Policy Page", with nothing before or after. |
| Starts With | ^div |
Matches any string beginning with "div" (like <div>). |
| Hyperlink Patterns | https?://[^"]+ |
Matches URLs starting with http:// or https://, followed by any characters that are not a double quote ("). |
| Media Files | \.(mp4|webm|avi|mov|mp3|wav) |
Matches the specified video or audio file extensions. |
| Surrounded Text | [^"]cat[^"] |
Matches "cat" only when it is not inside double quotes. |
| Repeating Letters | a{2,5} |
Matches "aa", "aaa", "aaaa", or "aaaaa". |
| Sequence + Digits | abc\d{3} |
Matches "abc" followed by exactly 3 digits (e.g., abc123). |
Key concepts for regex rules
To make the most of regex in the Policy Hub, keep three fundamental rules in mind:
-
Escaping Special Characters: Characters like
.,?,*, and(have special meanings in Regex. If you want to search for the character itself, you must "escape" it with a backslash (\). -
Anchors (
^and$): Anchors tell the engine where in the string the match must occur.-
^(Caret): The match must start at the very beginning of the line. -
$(Dollar): The match must occur at the very end of the line.
-
-
Quantifiers and Ranges: When you see curly braces
{ }, you are telling the engine how many times to look for a character. - Character limit: The current character limit for regex rules is 255.
Adding an exclusion rule
Exclusions let you skip specific items that would otherwise be flagged by your policy, such as media files or documents with a certain name, type, or size. They're useful when your rules are broad but some files or pages shouldn't be flagged, like archived records that are kept as-is. Each policy can have up to 10 exclusions.
In this example, the policy flags PDF documents larger than 5 MB. The exclusion skips any document with "archive" in its name (e.g., archive-course-catalog-2019.pdf), so only the remaining large PDFs are flagged.
Understanding policy types
The Policy Hub provides different types of policies, including Content, Media, and Document. Each policy type allows you to configure specific sets of rules to create a custom scanning policy for your website. See the table below for the available rules for each type.
| Policy Type | Description | Rules Available |
| Content | Find elements of a web page, including the title, URL, text on the page, meta descriptions, link text, and overall page structure. | Content Match: Checks for specific content within the text of the web page. |
| HTML Match: Checks for specific HTML structures or elements. | ||
| Link Text: Checks for specific links with text on the web page. | ||
| Media | Find information regarding files, including the type of file, where it is stored, when it was uploaded, and the pages that link to it. | Media File Type: Check if the media file type matches the specified criteria. |
| Media File Name: Check if the media file name matches the specified criteria. | ||
| Image File Size: Check the size of the media file. | ||
| Image Alt Text: Check for specific alt text in images. | ||
| Document |
Find documents related to the type of document, its location, size, upload date, and pages that link to it. |
Document Type: Check if the document type matches the specified criteria. |
| Document Name: Check if the document name matches the specified criteria. | ||
| Document Size: Check the size of the document. |