← Microsoft questions
CodingReported in a candidate post, Aug 2018

Count occurrences of regex pattern 10*1 in a string

Filed under Microsoft

Given a string, count the number of overlapping or non-overlapping occurrences of the regular expression pattern '10*1', which means a '1' followed by any number of '0's (including zero) and ending…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

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