Data manipulation with regex