User:Daniel Quinlan/Scripts/AnyMessage
| Description | Adds string and regex search to Special:AllMessages in addition to the default prefix search. |
|---|---|
| Author | Daniel Quinlan |
| Status | Beta |
| Updated | 29 March 2026 |
| Browsers | Firefox, Safari, Chrome |
| Source | AnyMessage.js |
AnyMessage adds string and regex search to Special:AllMessages in addition to the default prefix search.
Features
[edit]- String search: Search for any substring in message names or text.
- Regex search: Search using regular expressions.
- Talk link resolution: Talk page links in results are resolved and linked when they exist.
- TranslateWiki links: Each result includes a direct link to the corresponding TranslateWiki translation page.
- Global support: Works globally across Wikimedia sites using the standard Special:AllMessages interface.
Usage
[edit]On Special:AllMessages, additional search options are displayed in a second column in the search form:
- Match type: Choose between Prefix (default behavior), String (substring search), and Regex (regular expression search).
- Case insensitive: When enabled, search is case insensitive (only applies to String and Regex modes).
- Search: Enable searching message Name, message Text, or both.
Enter a search term in the search field and click the filter button to run the search. In Prefix mode, the original search behavior is preserved. In String or Regex mode, AnyMessage fetches all messages and filters them client-side, displaying results without pagination.
Regular expressions
[edit]A regular expression (regex) is a sequence of characters that define a pattern to search for in text. For an interactive introduction on how to write regular expressions, visit RegexOne.
Installation
[edit]To install the AnyMessage script, follow these steps:
- In your preferences, go to Preferences → Gadgets. At the bottom of the "Advanced" section, click the "Install scripts without having to manually edit JavaScript files (documentation)" checkbox, then click the "Save" button.
- Return to this page and click the blue "Install" button.
Alternatively, you can manually install it by adding the following code to your common.js file:
{{subst:iusc|User:Daniel Quinlan/Scripts/AnyMessage.js}}
Notes
[edit]- While AnyMessage works on most Wikipedia editions, the additional search options are currently English-only.
- Searching in String or Regex mode fetches all system messages at once and filters the results locally. This may use significant bandwidth and display a large number of results on a single page.