TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
hadoop hadoop
NA
159
50.8k
validation of hyphen in the beginning or at the end
Jun 23 2015 4:10 AM
how to validate if hyphen is present in the beginning or at the end? I've done:
<asp:RegularExpressionValidator ID="Regex1" runat="server" ControlToValidate="txtPANnu"
Display="Dynamic" SetFocusOnError="true" ErrorMessage="*Enter Only Alphanumeric characters" ValidationExpression="^[0-9a-zA-Z-]+$">
</asp:RegularExpressionValidator>
this checks only for hyphen but I've to check whether the hypen is present in the beginning or at the end, if so generates error.
so
correct inputs
are ::
1243-adfsda
fjld-303-ljsdl-3o32
invalid inputs
::
-dfds-322 (present at the beginning)
jlsd-8080- (present at the end)
Reply
Answers (
1
)
MS SQL
Oracle Query - Single Quotes and Characters