Are you sure you have correct regex? Also you shouldn't use flush_rewrite_rules() on init hook. Better to just go and re-save permalinks options in admin, so you won't flush rules every time.
Try to change regex to all chars, otherwise it looks good.
add_rewrite_rule ('^([^/]*)/?', 'index.php?lang=$matches', 'top');
Any rule that doesn't point to index.php is interpreted as an external rule and gets added to .htaccess.
$matches array works only when second argument ($redirect) of add_rewrite_rule() point to file index.php. External rules need to use the $1, $2 instead of $matches, $matches.
Remember to flush rewrite rules after the change.