← Envestnet Yodlee questions
CodingEasy to Medium

Count occurrences of a substring surrounded by alphanumeric characters

Filed under Envestnet Yodlee

The question

Given two strings, str1 and str2, find the number of times str1 appears within str2. The occurrences must be surrounded by alphanumeric characters, unless they are at the very beginning or end of the string.

No write-up yet. Related questions below have one.

Related Envestnet Yodlee questions

Collected from public candidate posts and coding forums. Updated Nov 2026.