• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

Regular expression for Headline

<asp:RegularExpressionValidator ID="REVtxtHeadLine" runat="server" ControlToValidate="txtHeadLine"
                                Font-Size="X-Small" SetFocusOnError="true" ValidationExpression="^[a-zA-Z]{1}[a-zA-Z]{1,74}$"
                                ErrorMessage="<b>A valid HeadLineis required,</b><br />Please type between 2 to 128 letters<br />(One Line Sentence)"
                                Display="None"></asp:RegularExpressionValidator>

Shoud be aloud spaces, periods and commons, bracket any charact except something that can screw up database.
0
mathieu_cupryk
Asked:
mathieu_cupryk
  • 4
  • 2
1 Solution
 
elimesikaCommented:
HI

This should be OK
"[a-zA-Z .,()]+"

Open in new window

0
 
elimesikaCommented:
hmmmmm......

I think that you should also allow numbers
so
"[a-zA-Z0-9 .,()]+"

Open in new window

0
 
mathieu_cuprykAuthor Commented:
^[a-zA-Z0-9 .,()]{1,74}$

?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
mathieu_cuprykAuthor Commented:
^[a-zA-Z0-9 .,()]{1,127}$
0
 
mathieu_cuprykAuthor Commented:
I also want specal characters?
",,,,,,,,,,,,,,,,........................"
0
 
mathieu_cuprykAuthor Commented:
k
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now