\!the literal ! (3310 / 418 / 2116)
\[the literal [ (9110 / 1338 / 5B16)
Group img_alt(?<img_alt>.+?) .+?any character (except for line terminators), repeated at least once
\]the literal ] (9310 / 1358 / 5D16)
Comment: image alternative text, i.e. the text used when the image does not
Non-Capturing Group(?:
(?:
[ ]? # possibly followed by some spaces
(?:\n[ ]*)? # and a new line with some space
\[(?<img_id>.*?)\] # with the link id in brackets, but may be empty
)
|
(?:
(?:
\(
[ \t]*
<(?<img_url> # link url within <>; or
.+?
)>
[ \t]* # possibly followed by some spaces or tabs
(?:
(?<img_title_container>['"]) # Title is surrounded ether by double or single quotes
(?<img_title>.*?) # actual title, but could be empty as in ""
\g{img_title_container} # make the sure enclosing mark balance
)?
[ \t]*
\)
)
|
(?:
\(
[ \t]*
(?<img_url> # link url within <>; or
(?:((?!["']).)*+|.*)
)
[ \t]*
(?:
(?<img_title_container>['"]) # Title is surrounded ether by double or single quotes
(?<img_title>.*?) # actual title, but could be empty as in ""
\g{img_title_container} # make the sure enclosing mark balance
)?
[ \t]*
\)
)
)
) 1st Alternative
(?:
[ ]? # possibly followed by some spaces
(?:\n[ ]*)? # and a new line with some space
\[(?<img_id>.*?)\] # with the link id in brackets, but may be empty
)
Non-Capturing Group(?:
[ ]? # possibly followed by some spaces
(?:\n[ ]*)? # and a new line with some space
\[(?<img_id>.*?)\] # with the link id in brackets, but may be empty
) ?matches at most one character from the set below:
the literal (3210 / 408 / 2016)
Comment: possibly followed by some spaces
Non-Capturing Group(?:\n[ ]*)? ?repeats the group contents below at most once:
\na line-feed (newline) character (ASCII 10)
*matches any number of characters from the set below:
the literal (3210 / 408 / 2016)
Comment: and a new line with some space
\[the literal [ (9110 / 1338 / 5B16)
Group img_id(?<img_id>.*?) .*?any character (except for line terminators), repeated any number of times
\]the literal ] (9310 / 1358 / 5D16)
Comment: with the link id in brackets, but may be empty
2nd Alternative
(?:
(?:
\(
[ \t]*
<(?<img_url> # link url within <>; or
.+?
)>
[ \t]* # possibly followed by some spaces or tabs
(?:
(?<img_title_container>['"]) # Title is surrounded ether by double or single quotes
(?<img_title>.*?) # actual title, but could be empty as in ""
\g{img_title_container} # make the sure enclosing mark balance
)?
[ \t]*
\)
)
|
(?:
\(
[ \t]*
(?<img_url> # link url within <>; or
(?:((?!["']).)*+|.*)
)
[ \t]*
(?:
(?<img_title_container>['"]) # Title is surrounded ether by double or single quotes
(?<img_title>.*?) # actual title, but could be empty as in ""
\g{img_title_container} # make the sure enclosing mark balance
)?
[ \t]*
\)
)
)
Non-Capturing Group(?:
(?:
\(
[ \t]*
<(?<img_url> # link url within <>; or
.+?
)>
[ \t]* # possibly followed by some spaces or tabs
(?:
(?<img_title_container>['"]) # Title is surrounded ether by double or single quotes
(?<img_title>.*?) # actual title, but could be empty as in ""
\g{img_title_container} # make the sure enclosing mark balance
)?
[ \t]*
\)
)
|
(?:
\(
[ \t]*
(?<img_url> # link url within <>; or
(?:((?!["']).)*+|.*)
)
[ \t]*
(?:
(?<img_title_container>['"]) # Title is surrounded ether by double or single quotes
(?<img_title>.*?) # actual title, but could be empty as in ""
\g{img_title_container} # make the sure enclosing mark balance
)?
[ \t]*
\)
)
) 1st Alternative
(?:
\(
[ \t]*
<(?<img_url> # link url within <>; or
.+?
)>
[ \t]* # possibly followed by some spaces or tabs
(?:
(?<img_title_container>['"]) # Title is surrounded ether by double or single quotes
(?<img_title>.*?) # actual title, but could be empty as in ""
\g{img_title_container} # make the sure enclosing mark balance
)?
[ \t]*
\)
)
Non-Capturing Group(?:
\(
[ \t]*
<(?<img_url> # link url within <>; or
.+?
)>
[ \t]* # possibly followed by some spaces or tabs
(?:
(?<img_title_container>['"]) # Title is surrounded ether by double or single quotes
(?<img_title>.*?) # actual title, but could be empty as in ""
\g{img_title_container} # make the sure enclosing mark balance
)?
[ \t]*
\)
) \(the literal ( (4010 / 508 / 2816)
*matches any number of characters from the set below:
the literal (3210 / 408 / 2016)
\ta tab character (ASCII 9)
<the literal text <
Group img_url(?<img_url> # link url within <>; or
.+?
) Comment: link url within <>; or
.+?any character (except for line terminators), repeated at least once
*matches any number of characters from the set below:
the literal (3210 / 408 / 2016)
\ta tab character (ASCII 9)
Comment: possibly followed by some spaces or tabs
Non-Capturing Group(?:
(?<img_title_container>['"]) # Title is surrounded ether by double or single quotes
(?<img_title>.*?) # actual title, but could be empty as in ""
\g{img_title_container} # make the sure enclosing mark balance
)? ?repeats the group contents below at most once:
Group img_title_container(?<img_title_container>['"]) 'the literal ' (3910 / 478 / 2716)
"the literal " (3410 / 428 / 2216)
Comment: Title is surrounded ether by double or single quotes
Group img_title(?<img_title>.*?) .*?any character (except for line terminators), repeated any number of times
Comment: actual title, but could be empty as in ""
\g{img_title_container}the text saved by group img_title_container
Comment: make the sure enclosing mark balance
*matches any number of characters from the set below:
the literal (3210 / 408 / 2016)
\ta tab character (ASCII 9)
\)the literal ) (4110 / 518 / 2916)
2nd Alternative
(?:
\(
[ \t]*
(?<img_url> # link url within <>; or
(?:((?!["']).)*+|.*)
)
[ \t]*
(?:
(?<img_title_container>['"]) # Title is surrounded ether by double or single quotes
(?<img_title>.*?) # actual title, but could be empty as in ""
\g{img_title_container} # make the sure enclosing mark balance
)?
[ \t]*
\)
)
Non-Capturing Group(?:
\(
[ \t]*
(?<img_url> # link url within <>; or
(?:((?!["']).)*+|.*)
)
[ \t]*
(?:
(?<img_title_container>['"]) # Title is surrounded ether by double or single quotes
(?<img_title>.*?) # actual title, but could be empty as in ""
\g{img_title_container} # make the sure enclosing mark balance
)?
[ \t]*
\)
) \(the literal ( (4010 / 508 / 2816)
*matches any number of characters from the set below:
the literal (3210 / 408 / 2016)
\ta tab character (ASCII 9)
Group img_url(?<img_url> # link url within <>; or
(?:((?!["']).)*+|.*)
) Non-Capturing Group(?:
(?<img_title_container>['"]) # Title is surrounded ether by double or single quotes
(?<img_title>.*?) # actual title, but could be empty as in ""
\g{img_title_container} # make the sure enclosing mark balance
)? \)the literal ) (4110 / 518 / 2916)
Negative Lookbehind(?<!\\) \{the literal { (12310 / 1738 / 7B16)
Character Class[[:blank:]\h]* Group img_attr(?<img_attr>.+?) Character Class[[:blank:]\h]* \}the literal } (12510 / 1758 / 7D16)