docs: Add docs for CurseForge regex filename matcher (#4223)

This commit is contained in:
Harrison Black
2026-08-09 08:09:24 -05:00
committed by GitHub
parent 9b12eb6a6c
commit 21b134fd2b
2 changed files with 17 additions and 2 deletions
@@ -109,7 +109,7 @@ The latest modpack file and its associated mod loader will be located and instal
- Use `CF_PAGE_URL`, but include the full URL to a specific file - Use `CF_PAGE_URL`, but include the full URL to a specific file
- Set `CF_FILE_ID` to the numerical file ID - Set `CF_FILE_ID` to the numerical file ID
- Specify a substring to match the desired filename with `CF_FILENAME_MATCHER` - Specify either a substring or a regex pattern surrounded with "/" to match the desired filename with `CF_FILENAME_MATCHER`
The following shows where to get the URL to the specific file and also shows where the file ID is located: The following shows where to get the URL to the specific file and also shows where the file ID is located:
@@ -131,6 +131,21 @@ The following examples all refer to version 1.0.7 of ATM8:
CF_FILENAME_MATCHER: 1.0.7 CF_FILENAME_MATCHER: 1.0.7
``` ```
To use a regular expression instead, surround the pattern with `/` characters:
```yaml
# Matches filenames containing a 1.0.7 version
CF_SLUG: all-the-mods-8
CF_FILENAME_MATCHER: '/1\.0\.7/'
```
Regular expressions can use `^` to anchor a match to the beginning of the filename and `$` to anchor it to the end. The following matches an ATM8 filename that starts with `all-the-mods-8` and ends with `1.0.7.zip`:
```yaml
CF_SLUG: all-the-mods-8
CF_FILENAME_MATCHER: '/^All the Mods 8-1\.0\.7\.zip$/'
```
Pinning modpack version also pins the mod loader (to the version specified by the modpack). Mod loader version cannot be pinned independently of the modpack. Pinning modpack version also pins the mod loader (to the version specified by the modpack). Mod loader version cannot be pinned independently of the modpack.
### Custom modloader versions ### Custom modloader versions
+1 -1
View File
@@ -611,7 +611,7 @@ This image maps known server properties as described in [this section](configura
</tr> </tr>
<tr> <tr>
<td><code>CF_FILENAME_MATCHER</code></td> <td><code>CF_FILENAME_MATCHER</code></td>
<td>Specify a substring to match the desired filename</td> <td>Specify either a substring or a regex pattern surrounded with "/" to match the desired filename</td>
<td><code></code></td> <td><code></code></td>
<td>⬜️</td> <td>⬜️</td>
</tr> </tr>