How can I change this regular expression to remove everything from a string except alphabets and a ‘(single quote)?
pattern = /\b(ma?c)?([a-z]+)/ig;
- this pattern removes unwanted spaces and capitalizes the first letter and turns the rest into lower case
- By alphabets I mean English letters a-z.