10-of-my-most-popular-text-to-image-series-prompts-78b0897e
generate a bunch of images, then you curate the results to handpick the best ones
Practical regex patterns across languages and use cases. Use when validating input (email, URL, IP), parsing log lines, extracting data from text, refactoring code with search-and-replace, or debugging why a regex doesn't match.
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
SkillHub CLI
skillhub install gitgoodordietrying/regex-patternsInspect the source and compatibility requirements, then follow its installation steps.
Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.
Practical regular expression cookbook. Patterns for validation, parsing, extraction, and refactoring across JavaScript, Python, Go, and command-line tools.
| Pattern | Matches | Example |
|---|---|---|
. |
Any character (except newline) | a.c matches abc, a1c |
\d |
Digit [0-9] |
\d{3} matches 123 |
\w |
Word char [a-zA-Z0-9_] |
\w+ matches hello_123 |
\s |
Whitespace [ \t\n\r\f] |
\s+ matches spaces/tabs |
\b |
Word boundary | \bcat\b matches cat not scatter |
^ |
Start of line | ^Error matches line starting with Error |
$ |
End of line | \.js$ matches line ending with .js |
\D, \W, \S |
Negated: non-digit, non-word, non-space |
| Pattern | Meaning |
|---|---|
* |
0 or more (greedy) |
+ |
1 or more (greedy) |
? |
0 or 1 (optional) |
{3} |
Exactly 3 |
{2,5} |
Between 2 and 5 |
{3,} |
3 or more |
*?, +? |
Lazy (match as few as possible) |
| Pattern | Meaning |
|---|---|
(abc) |
Capture group |
(?:abc) |
Non-capturing group |
(?P<name>abc) |
Named group (Python) |
(?<name>abc) |
Named group (JS/Go) |
a|b |
Alternation (a or b) |
[abc] |
Character class (a, b, or c) |
[^abc] |
Negated class (not a, b, or c) |
[a-z] |
Range |
| Pattern | Meaning |
|---|---|
(?=abc) |
Positive lookahead (followed by abc) |
(?!abc) |
Negative lookahead (not followed by abc) |
(?<=abc) |
Positive lookbehind (preceded by abc) |
(?<!abc) |
Negative lookbehind (not preceded by abc) |
These signals come from indexed source analysis and may lag behind changes. Check the current source files.
# Regex Patterns
Practical regular expression cookbook. Patterns for validation, parsing, extraction, and refactoring across JavaScript, Python, Go, and command-line tools.
## When to Use
- Validating user input (email, URL, IP, phone, dates)
- Parsing log lines or structured text
- Extracting data from strings (IDs, numbers, tokens)
- Search-and-replace in code (rename variables, update imports)
- Filtering lines in files or command output
- Debugging regexes that don't match as expected
## Quick Reference
### Metacharacters
| Pattern | Matches | Example |
|---|---|---|
| `.` | Any character (except newline) | `a.c` matches `abc`, `a1c` |
| `\d` | Digit `[0-9]` | `\d{3}` matches `123` |
| `\w` | Word char `[a-zA-Z0-9_]` | `\w+` matches `hello_123` |
| `\s` | Whitespace `[ \t\n\r\f]` | `\s+` matches spaces/tabs |
| `\b` | Word boundary | `\bcat\b` matches `cat` not `scatter` |
| `^` | Start of line | `^Error` matches line starting with Error |
| `$` | End of line | `\.js$` matches line ending with .js |
| `\D`, `\W`, `\S` | Negated: non-digit, non-word, non-space | |
### Quantifiers
| Pattern | Meaning |
|---|---|
| `*` | 0 or more (greedy) |
| `+` | 1 or more (greedy) |
| `?` | 0 or 1 (optional) |
| `{3}` | Exactly 3 |
| `{2,5}` | Between 2 and 5 |
| `{3,}` | 3 or more |
| `*?`, `+?` | Lazy (match as few as possible) |
### Groups and Alternation
| Pattern | Meaning |
|---|---|
| `(abc)` | Capture group |
| `(?:abc)` | Non-capturing group |
| `(?P<name>abc)` | Named group (Python) |
| `(?<name>abc)` | Named group (JS/Go) |
| `a\|b` | Alternation (a or b) |
| `[abc]` | Character class (a, b, or c) |
| `[^abc]` | Negated class (not a, b, or c) |
| `[a-z]` | Range |
### Lookahead and Lookbehind
| Pattern | Meaning |
|---|---|
| `(?=abc)` | Positive lookahead (followed by abc) |
| `(?!abc)` | Negative lookahead (not followed by abc) |
| `(?<=abc)` | Positive lookbehind (preceded by abc) |
| `(?<!abc)` | Negative lookbehind (not preceded by abc) |
## Validat...generate a bunch of images, then you curate the results to handpick the best ones
generate a bunch of images, then you curate the results to handpick the best ones
Productivity system based on Maya calendar with 13 natural tones for project management and personal development
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.