Is there documentation for Regex syntax?

When I say documentation, I mean to document what are the symbols and the meanings in a regex literal expression, such as what does /d mean, or ?,+, etc.

1 Like

Swift's regex implementation follows several regex standards, so the documentation for any of them will likely work. Here are some interactive tutorials.. I can't vouch for their quality, but it seems like a gentle intro.

2 Likes

I personally like to use a good online regex tool like https://regex101.com/ for trying things out.

In addition to an entry tutorial you should have a look at the very useful lookahead feature. E.g. when you do replacements, this feature can save you from having to apply a replacement several times. (Note that at least with the new regex literals, look-behinds are not available in Swift, only look-aheads.)

1 Like

Each language has its own "flavor" for (literal) regex syntax.