\documentclass{article}
\usepackage{hyperref}
\usepackage{expl3}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
pdftitle={Overleaf Example},
pdfpagemode=FullScreen,
}
\ExplSyntaxOn
\NewDocumentCommand{\curl}{m}{
\tl_set:Nn \l_tmpa_tl {#1}
\regex_extract_once:nnN {\/([a-z0-9]{10})} {#1} \l_uiy_result_seq
\seq_map_inline:Nn \l_uiy_result_seq {\href{#1}{##1}}
}
\ExplSyntaxOff
\begin{document}
\curl{https://www.facebook.com/reel/1a1c6e99h60a3169h86816}
\end{document}
Using this code I'm getting match & match group one after one.
Example
\curl{https://www.facebook.com/reel/1a1c6e99h60a3169h86816}
Where First /1a1c6e99h6 is match & second half is match group 1a1c6e99h6
How can I only map match group 1a1c6e99h6


\seq_pop_leftbefore iterating on the sequence? The doc says : "If it exists, the match is stored as the first item of the ⟨seq var⟩, and further items are the contents of capturing groups, in the order of their opening parenthesis. " – projetmbc Feb 15 '23 at 08:32\seq_pop_leftis not working – d4rkshad0w Feb 15 '23 at 08:47\begin{document}... etc. This will allow us to copy and paste your code in https://texlive.net/run to quickly try something... – projetmbc Feb 15 '23 at 08:48