match arguments similar to shell, supports quoted string

Published on Tue Mar 01 2022

first group matches quoted strings second group plain text, arguments are separated with a space. example: "this is a \"string\"" thisisnot "another \"string\" with a backslash \"\\"" just replace \" with " after matching.

Additional matching regexes for
match arguments similar to shell, supports quoted string

match arguments similar to shell, supports quoted string

first group matches quoted strings second group plain text, arguments are separated with a space. example: "this is a \"string\"" thisisnot "another \"string\" with a backslash \"\\"" just replace \" with " after matching.

Anything sorounded by " "

Match anything inside double quote string and set the first capture group with the content

CSV parsing

matches the exact fields of CSV files supports: qouted fields quoted fields containing commas, doubble quoutes, and newlines empty fields empty records arbitrary white space in, and outside quoted fields

Regex for chatbot to match & extract multiple command

Example: "/lowercase HELLO .:uppercase ::weather london" ===Match #1 prefix: / command: lowercase arguments: HELLO ===Match #2 prefix: .: command: uppercase arguments: - ===Match #3 prefix: :: command: weather arguments: london

Match quoted strings, ignoring escaped quotes

Matches single or double quoted strings, and ignores backslash-escaped quotes within the string.

Split quotes and single words

Find " and ' quoted strings and "orphaned"/single words in a string

Triple Quoted String

More powerful than python style, this supports things like `"""" """"`, which matches totally. Also supports `"""a""""""b"""`, where there are two matches: `"""a"""`,`"""b"""`.

french phone number + match right part

Matches french numbers (not special numbers like 115, 18). First matching group contains the right part without prefix (0, +33, 33, 033, or 0033).

IPv4 + TCP-Port

This regex matches a IPv4 with a TCP Port (1-65535) Example: `192.168.0.69:1337` will match and have the groups: - Group 1: `192.168.0.69` - Group 2: `1337`

Search for Qualifications

This will identify M.D.'s and D.O.s, regardless of punctuation (within reason) and exclude similar matches (e.g., DMD)