473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

What does this represent in regularexpession validator control

375 256MB
Hi
while debugging a code i found a Regular expression validator control having a property as below
ValidationExpression="[\w\ .-]*"

Can any one please let me know what does this stand for.

I am using C# and asp.net.

regards
cmrhema
Jul 29 '08 #1
5 948
r035198x
13,262 8TB
Hi
while debugging a code i found a Regular expression validator control having a property as below
ValidationExpression="[\w\ .-]*"

Can any one please let me know what does this stand for.

I am using C# and asp.net.

regards
cmrhema
Is that a space between \ and . or was that added by the forum software?
If there is no space then that should match any words (letters and digits) which are allowed to start with and contain a dot (.) or a hyphen(-). No input is also matched.
Jul 29 '08 #2
cmrhema
375 256MB
Is that a space between \ and . or was that added by the forum software?
If there is no space then that should match any words (letters and digits) which are allowed to start with and contain a dot (.) or a hyphen(-). No input is also matched.
Many thanks for the reply

There was a space betweeen the \ and .
In another expression it was as below
ValidationExpression="[\w\-]*"

Can you please be more precise
Jul 29 '08 #3
r035198x
13,262 8TB
...

Can you please be more precise
The [] surround a character class. The * says zero or more times.
So []* says whatever is in the [] can repeat itself zero or more times.
Now coming to what's in the [] , the \w\ represents a word (combination of characters and digits) and the - since it appears at the end represents itself rather than specifies a range (as it would do in a-e).
Jul 29 '08 #4
cmrhema
375 256MB
The [] surround a character class. The * says zero or more times.
So []* says whatever is in the [] can repeat itself zero or more times.
Now coming to what's in the [] , the \w\ represents a word (combination of characters and digits) and the - since it appears at the end represents itself rather than specifies a range (as it would do in a-e).
many many thanks for the answer
Jul 29 '08 #5
TRScheel
638 Expert 512MB
many many thanks for the answer
I personally hate regular expressions so I use this
Jul 29 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Don Clark | last post by:
Hello; Admittedly, I'm very new to HTML, and this is my first post to any newsgroup, so please go easy. I was looking at the html code for an email I received and noted an href statement that...
0
by: Bryce Budd | last post by:
Hello All, I've been a taker of information from newsgroups for a long time and thought I'd finally make a contribution back to the community whose supported me when I've needed it. After all...
5
by: Richard Payne | last post by:
Hi This is probably a newbie question but I can't seem to find a clear answer to the problem I have. I have created a Custom Validator control on my webform that works fine, but when I put...
4
by: Milan | last post by:
Hi, I am having a problem with displaying a * to a required field. There seems to be a problem with this and the static value does not appear unless you submit the page. I am trying to display...
9
by: AFN | last post by:
I was just dropped into someone else's code (isn't that always so fun?). I can't figure out why a custom validation control's server event function is executing. There is nothing (that I see)...
3
by: thomson | last post by:
Hi, I have 5 aspx pages, In one page i have a Compare Validator Control, The four aspx pages are loading fast with similar controls, no code behind, But the page having Compare Validator Control...
2
by: Mike Collins | last post by:
I have a form where I create dynamic controls at runtime. With this, I am adding a dynamic required field validator to each control as needed, but the validators are not firing when I click submit....
0
by: Gonza | last post by:
Hi group, i'm trying to add a customvalidator control to a custom web control. The problem is i'm getting a "Unable to find control id..." exception. Here is the code: public class CuitTextBox :...
1
by: Gonza | last post by:
Hi group, i'm trying to add a customvalidator control to a custom web control. The problem is i'm getting a "Unable to find control id..." exception. Here is the code: public class CuitTextBox :...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.