replaced the cycle by a regular expression