Skip to content

Commit 2dea52b

Browse files
committed
Add copilot prompt to PowerRename regex section
1 parent d4426fa commit 2dea52b

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

hub/powertoys/powerrename.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: PowerToys PowerRename utility for Windows
33
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
57
ms.topic: concept-article
68
ms.localizationpriority: medium
79
no-loc: [PowerRename, Windows, File Explorer, regex, Boost]
@@ -205,6 +207,24 @@ Matching and variable examples. Capturing groups are defined in parentheses `()`
205207
| `^(.{n})(.*)` or `(.*)(.{n})$` | `$1foo$2` | Insert "foo" *n* characters from the beginning or the end, respectively |
206208
| `^.{n}` or `.{n}$` | nothing | Trim *n* characters from the beginning or the end, respectively |
207209

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+
208228
### Additional resources for learning regular expressions
209229

210230
There are some useful examples/cheatsheets available to help you:

0 commit comments

Comments
 (0)