Severity: wishlist
Just wondering if the following is of any interest:
(defun string-matched-text (regexp string num &optional start)
=C2=A0 ""
=C2=A0 (when (string-match regexp string start)
=C2=A0 =C2=A0 (match-string num string)))
Then,
(let ((str "foo-123"))
=C2=A0 (when (string-match "[[:alpha:]]+-\\([0-9]+\\)" str)
=C2=A0 =C2=A0 (match-string 1 str)))
=3D> "123"
is equivalent to:
(string-matched-text "[[:alpha:]]+-\\([0-9]+\\)" "foo-123&qu=
ot; 1)
=3D> "123"
This looks useful, but I think it would be=
even better to add it as a pcase macro to be composable (see attached patc=
h).=C2=A0