Fix invalid help tag
Improve regex pattern and remove trim