The use of regexp function is just to illustrate it's usage. The pattern used in the example is straightforward and do not look for any special characters etc. As @rtrivedi mentioned, you can create a table directly according to the schema of the file using following properties after defining the schema of the table.
create table <your table name>
row format delimited
fields terminated by ',';
However, the use of regexp in the example may expand the list of the topics covered in the example.
Hope that helps!