Users Pricing

forum

Home Forums Regular expression to match maximium of five words – MindStick

Regular expression to match maximium of five words

Pravesh Singh 2027 27 Aug 2014

I have a regular expression

^[a-zA-Z+#-.0-9]{1,5}$

which validates that the word contains alpha-numeric characters and few special characters and length should not be more than 5 characters.

How do I make this regular expression to accept a maximum of five words matching the above regular expression.


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md