--- page: htroot/RegexTest.html help: help/RegexTest.md title: Regex Test package: blacklist-security-access access: public kind: ui-page backend_java: source/net/yacy/htroot/RegexTest.java --- # Regex Test ## Purpose Regex Test helps validate regular expressions used in crawls, blacklists, and filters. Use it before applying a pattern to crawling or deletion, where a broad match can have large effects. ## What You Can Do Here - Regex Test helps validate regular expressions used in crawls, blacklists, and filters. - Test a concrete URL, request, user, or pattern before applying broad policy. - Keep rules narrow enough that they block the intended problem without hiding useful content. ## Page Architecture Security and blacklist pages turn names, patterns, credentials, or request properties into allow/block decisions. The architecture is rule-oriented: define the rule, test the rule, then apply it to crawling, search, or access. | Control | Meaning | Values or examples | | --- | --- | --- | | `text` | Text used as input for a test, preview, or stored content field. | Text value; use the page label and surrounding context to choose the exact content. | | `regex` | Regular expression to test or apply. Escape special characters deliberately. | Regular expression syntax. | | `submit` | Submit action for the form. Its meaning depends on the surrounding fields. | Submit button value generated by the page; direct clients normally send the named action parameter. | ## Correct Use Test with a concrete example. A blacklist, regular expression, rate limit, cookie rule, or access rule is only understandable when checked against a real URL or request. Prefer narrow patterns and document the reason for broad rules. ## Access And Safety The page is normally public or read-only, unless the peer is configured to require authentication for all pages. ## Automation And API Page backend: `source/net/yacy/htroot/RegexTest.java`. | Endpoint | Method | Access | Backend | | --- | --- | --- | --- | | `/RegexTest.html` | `GET` | public or page-dependent | `source/net/yacy/htroot/RegexTest.java` | ### Parameter Guide The table explains values that an agent or script must set deliberately. Parameters not relevant to a task should be omitted or left at the page default. | Parameter | Meaning and valid values | Care | | --- | --- | --- | | `text` | Text used as input for a test, preview, or stored content field. | Set only when this option is part of the intended request; otherwise omit it and let YaCy use the page default. | | `regex` | Regular expression to test or apply. Escape special characters deliberately. | Set only when this option is part of the intended request; otherwise omit it and let YaCy use the page default. | | `submit` | Submit action for the form. Its meaning depends on the surrounding fields. | Changes stored data, configuration, or a running job. Use the authenticated action flow where required and verify the result. | Example request shape: ```http GET /RegexTest.html?text=...®ex=...&submit=... ``` ## What To Expect Expect a rule list, match test, access record, cookie view, or confirmation. The real proof is behavioral: the same URL, request, or user should now be accepted, blocked, limited, or displayed as intended. ## Related Pages - `https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html`