Skip to content

Commit 440bc19

Browse files
committed
Change link to regex tutorial
Change link to regex tutorial. The previous one is paywalled on Medium.com. We received an issue about it: #4584
1 parent 3df0415 commit 440bc19

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

hub/powertoys/powerrename.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: PowerToys PowerRename utility for Windows
33
description: A windows shell extension for bulk renaming of files
4-
ms.date: 08/03/2023
4+
ms.date: 08/06/2023
55
ms.topic: article
66
ms.localizationpriority: medium
77
no-loc: [PowerRename, Windows, File Explorer, regex, Boost]
@@ -99,42 +99,43 @@ If selected, you can use the following patterns as part of the _Replace with_ te
9999
You can also use multiple counters in the same replace string and combine customizations.
100100

101101
For example, given a _Search_ text `a` and a set of files:
102+
102103
- a.jpg
103104
- ab.jpg
104105
- abc.jpg
105106

106107
A _Replace with_ text `Image_${padding=4;increment=2;start=10}_` would produce the following:
108+
107109
- Image_0010_.jpg
108110
- Image_0012_b.jpg
109111
- Image_0014_bc.jpg
110112

111-
112113
## Replace using file creation date and time
113114

114115
The creation date and time attributes of a file can be used in the _Replace with_ text by entering a variable pattern according to the table below. Selecting the tool-tip in the _Replace with_ field allows you to view and select from the supported patterns.
115116

116-
| Variable pattern | Explanation
117+
| Variable pattern | Explanation |
117118
| :--- | :--- |
118-
| `$YYYY` | Year, represented by a full four or five digits, depending on the calendar used.
119-
| `$YY` | Year, represented only by the last two digits. A leading zero is added for single-digit years.
120-
| `$Y` | Year, represented only by the last digit.
121-
| `$MMMM` | Name of the month.
122-
| `$MMM` | Abbreviated name of the month.
123-
| `$MM` | Month, as digits with leading zeros for single-digit months.
124-
| `$M` | Month, as digits without leading zeros for single-digit months.
125-
| `$DDDD` | Name of the day of the week.
126-
| `$DDD` | Abbreviated name of the day of the week.
127-
| `$DD` | Day of the month, as digits with leading zeros for single-digit days.
128-
| `$D` | Day of the month, as digits without leading zeros for single-digit days.
129-
| `$hh` | Hours, with leading zeros for single-digit hours.
130-
| `$h` | Hours, without leading zeros for single-digit hours.
131-
| `$mm` | Minutes, with leading zeros for single-digit minutes.
132-
| `$m` | Minutes, without leading zeros for single-digit minutes.
133-
| `$ss` | Seconds, with leading zeros for single-digit seconds.
134-
| `$s` | Seconds, without leading zeros for single-digit seconds.
135-
| `$fff` | Milliseconds, represented by full three digits.
136-
| `$ff` | Milliseconds, represented only by the first two digits.
137-
| `$f` | Milliseconds, represented only by the first digit.
119+
| `$YYYY` | Year, represented by a full four or five digits, depending on the calendar used. |
120+
| `$YY` | Year, represented only by the last two digits. A leading zero is added for single-digit years. |
121+
| `$Y` | Year, represented only by the last digit. |
122+
| `$MMMM` | Name of the month. |
123+
| `$MMM` | Abbreviated name of the month. |
124+
| `$MM` | Month, as digits with leading zeros for single-digit months. |
125+
| `$M` | Month, as digits without leading zeros for single-digit months. |
126+
| `$DDDD` | Name of the day of the week. |
127+
| `$DDD` | Abbreviated name of the day of the week. |
128+
| `$DD` | Day of the month, as digits with leading zeros for single-digit days. |
129+
| `$D` | Day of the month, as digits without leading zeros for single-digit days. |
130+
| `$hh` | Hours, with leading zeros for single-digit hours. |
131+
| `$h` | Hours, without leading zeros for single-digit hours. |
132+
| `$mm` | Minutes, with leading zeros for single-digit minutes. |
133+
| `$m` | Minutes, without leading zeros for single-digit minutes. |
134+
| `$ss` | Seconds, with leading zeros for single-digit seconds. |
135+
| `$s` | Seconds, without leading zeros for single-digit seconds. |
136+
| `$fff` | Milliseconds, represented by full three digits. |
137+
| `$ff` | Milliseconds, represented only by the first two digits. |
138+
| `$f` | Milliseconds, represented only by the first digit. |
138139

139140
For example, given the file names:
140141

@@ -196,7 +197,7 @@ _When using the variables, "Match all occurrences" must be selected._
196197

197198
There are great examples/cheatsheets available online to help you:
198199

199-
[Regex tutorial — A quick cheatsheet by examples](https://medium.com/factory-mind/regex-tutorial-a-simple-cheatsheet-by-examples-649dc1c3f285)
200+
[Regular Expression Tutorial](https://www.regular-expressions.info/tutorial.html)
200201

201202
[ECMAScript Regular Expressions Tutorial](https://o7planning.org/en/12219/ecmascript-regular-expressions-tutorial)
202203

0 commit comments

Comments
 (0)