in reply to regex finding shortest string containing n of $c

Based on your description of the problem and sample results, it looks like you mean shortest, not longest. Otherwise the answers are more like
1 - .....x...... 2 - .x.....x...... 3 - .x.....x......x 4 - x.x.....x......x

Replies are listed 'Best First'.
Re^2: regex finding longest string containing n of $c
by xipho (Scribe) on Sep 01, 2005 at 03:58 UTC
    Your right- my apologies, I am looking for shortest!