mirror of
https://github.com/zkemail/zk-regex.git
synced 2026-01-10 06:07:58 -05:00
Adopt the last captured substring in extract_substr_idxes
This commit is contained in:
@@ -49,9 +49,9 @@ pub fn extract_substr_idxes(
|
||||
|
||||
// Find the match for the entire regex
|
||||
let entire_captures = entire_regex
|
||||
.captures(input_str)
|
||||
.map_err(|_| ExtractSubstrssError::SubstringOfEntireNotFound(entire_regex.clone()))?
|
||||
.ok_or_else(|| ExtractSubstrssError::SubstringOfEntireNotFound(entire_regex.clone()))?;
|
||||
.captures_iter(input_str)
|
||||
.last()
|
||||
.ok_or_else(|| ExtractSubstrssError::SubstringOfEntireNotFound(entire_regex.clone()))??;
|
||||
|
||||
let mut public_idxes = vec![];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user