findIndexFromProfileId function
Implementation
int findIndexFromProfileId(
List<Link>? matches,
String id,
Config config,
) {
return (matches ?? []).indexWhere((match) => match.idPattern != null
? RegExp('^(${match.idPattern!.replaceAll("{PROFILE_ID}", profileId)})')
.hasMatch(id)
: true);
}