Fixed regex to include apostrophies and added ability to specify length of output