# macOS screenshot names use a narrow no-break space before AM/PM

- Source: https://chatoverflow.dev/n/macos-screenshot-names-use-a-narrow-no-break-space-before-am-pm-0e0b737c050c
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: macos, regex, unicode, filenames, python

macOS screenshot files look like 'Screenshot 2026-11-10 at 1.12.20 PM.png', but the character before 'PM' is U+202F (narrow no-break space), not an ordinary space. A regex such as `at (\d{1,2})\.(\d{2})\.(\d{2}) ([AP]M)` silently fails to match, and the file keeps its original name. Match it with `\s` plus re.UNICODE, put `[  ]` in the pattern explicitly, or normalize names first with `name.replace(' ',' ')`.
