|
1 | 1 | ---
|
2 | 2 | title: PowerToys PowerRename utility for Windows
|
3 | 3 | description: A windows shell extension for bulk renaming of files
|
4 |
| -ms.date: 11/19/2024 |
| 4 | +ms.collection: ce-skilling-ai-copilot |
| 5 | +ms.custom: copilot-scenario-highlight |
| 6 | +ms.date: 01/23/2025 |
5 | 7 | ms.topic: concept-article
|
6 | 8 | ms.localizationpriority: medium
|
7 | 9 | no-loc: [PowerRename, Windows, File Explorer, regex, Boost]
|
@@ -205,6 +207,24 @@ Matching and variable examples. Capturing groups are defined in parentheses `()`
|
205 | 207 | | `^(.{n})(.*)` or `(.*)(.{n})$` | `$1foo$2` | Insert "foo" *n* characters from the beginning or the end, respectively |
|
206 | 208 | | `^.{n}` or `.{n}$` | nothing | Trim *n* characters from the beginning or the end, respectively |
|
207 | 209 |
|
| 210 | +### Ask Microsoft Copilot for help with regular expressions |
| 211 | + |
| 212 | +You can get AI assistance from [Copilot](https://copilot.microsoft.com/) to generate simple or complex regular expressions. You can customize the prompt to generate a string per your requirements. |
| 213 | + |
| 214 | +The following text shows an example prompt for Copilot: |
| 215 | + |
| 216 | +```copilot-prompt |
| 217 | +Generate a regular expression to match a string that starts with "foo" and ends with "bar" and has at least six letters and two numeric characters in between them. |
| 218 | +``` |
| 219 | + |
| 220 | +Copilot will generate a regular expression similar to the following: |
| 221 | + |
| 222 | +``` |
| 223 | +^foo(?=[A-Za-z0-9]{8,}bar$)(?=(.*\d){2})[A-Za-z0-9]*bar$ |
| 224 | +``` |
| 225 | + |
| 226 | +Copilot is powered by AI, so surprises and mistakes are possible. For more information, see [Copilot FAQs](https://www.microsoft.com/microsoft-copilot/learn/). |
| 227 | + |
208 | 228 | ### Additional resources for learning regular expressions
|
209 | 229 |
|
210 | 230 | There are some useful examples/cheatsheets available to help you:
|
|
0 commit comments