I wanted to count a number of character or special case symbols or number in a given sentence and limit a sentence to only 25 .So I have used this regex ^[^a-zA-Z0-9 ]*{1,25}$ .But this regular expression considers and counts the space/white space.
For example : "this is the sentence i am count" Now here we have 25 characters.But above regular expression will count space/white space in btw words and reports below sentence as 25 characters
"this is the sentence i am"
Can you any one help me on this query ?
Thanks in advance