Fix bug caused by missing flags initialisation while splitting a regular expression