diff options
| author | Michael Peter Christen <mc@yacy.net> | 2026-07-10 00:20:29 +0200 |
|---|---|---|
| committer | Michael Peter Christen <mc@yacy.net> | 2026-07-10 00:20:29 +0200 |
| commit | dc84868b8b32e106dd97672040f251bb78f7d9ab (patch) | |
| tree | 2b566a7fc8d6f63d1e3c89cec38c25aefe2e8ec6 /help/RegexTest.md | |
| parent | ae8941b245f0e4b6e3c5f04bcac7a3ceb53ac370 (diff) | |
added help files for YaCy UI web pages
Diffstat (limited to 'help/RegexTest.md')
| -rw-r--r-- | help/RegexTest.md | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/help/RegexTest.md b/help/RegexTest.md new file mode 100644 index 000000000..5de53242e --- /dev/null +++ b/help/RegexTest.md @@ -0,0 +1,73 @@ +--- +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` |
