To specify an exact number of occurrences, include only one value between the { and the }. /de{3}f/ specifies exactly three occurrences of e, which means this pattern only matches deeef.