You need to Register for free and Login to post a message in the forum.

Forum

Regular Expression
Last Post 2010-03-16 08:19 AM by jumatthey. 4 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
jumattheyUser is Offline
Nuke Ace
Nuke Ace
Posts:42

--
2010-03-15 02:43 PM  
Hey all.

I need to find out a regular expression for a DotNetNuke module I am building.

This is my ASP tag :

            <asp:regularexpressionvalidator id="valRegEx" runat="server">< asp:RegularExpressionValidator id="valRegEx" runat="server"
                ControlToValidate="TextBox1"
                ValidationExpression="???"
                ErrorMessage="Your entry is not a valid name."
                display="Dynamic">
            < /asp:RegularExpressionValidator>

The field I want to check (TextBox1) must contain only letters, spaces allowed. Can anyone point me out to the correct regular expression I should use ?

Thank you very much.

JM
Joseph CraigUser is Online
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9309
Avatar

--
2010-03-15 03:45 PM  
Google for "Regular Expression Library" and search around. You should be able to find something that you can use.

Google for "Regular Expression Tutorial" and you can learn to creat your own regular expressions.

Joe Craig, DNN Creative Support

Subscribe to DNNCreative
I recommend PowerDNN for DotNetNuke Hosting.
Mark AllanUser is Offline
Nuker
Nuker
Posts:16

--
2010-03-15 08:12 PM  
Hi, For the case in point ValidationExpression="^[a-zA-z-' ]*$" should do it. I've added the hyphen and apostrophe characters on the assumption that you're checking for people's names and don't want to exclude Baba O'Riley and Basil Fotherington-Thomas, but if it's a different sort of name then just take them out of the expression. Cheers, Mark

Mark Allan (@MarkXA)

DNN Garden, home of the DDRMenu free DotNetNuke menu module

Mark AllanUser is Offline
Nuker
Nuker
Posts:16

--
2010-03-15 08:12 PM  
Hi, For the case in point ValidationExpression="^[a-zA-z-' ]*$" should do it. I've added the hyphen and apostrophe characters on the assumption that you're checking for people's names and don't want to exclude Baba O'Riley and Basil Fotherington-Thomas, but if it's a different sort of name then just take them out of the expression. Cheers, Mark

Mark Allan (@MarkXA)

DNN Garden, home of the DDRMenu free DotNetNuke menu module

jumattheyUser is Offline
Nuke Ace
Nuke Ace
Posts:42

--
2010-03-16 08:19 AM  
Hi,

Thank you very much Mark. It is indeed a name I am checking. Thank you for your help, very much appreciated.
You are not authorized to post a reply.

Active Forums 4.3

Latest Forum Posts

DNN 6.2 by Sameer
Hi All i am using dnn 6.2 beta version for my demo site i need to custmize the 4 modules in that
RE: Deploying dnn by Sameer
Thanks a lot so kind of you
RE: Unable to Create Skin Package by schilders
Joe, When I click the Edit icon next to the skin package on the Host Extensions page, I receive t
horizontal main and submenu items by Dan Glanton
I found a very good tutorial on horizontal main and subitems in DNN Creative, but what about if you
RE: Skin creation - Menu questoni by Joseph Craig
This has to do with the structure of the elements that make up the skin and the CSS. Most likely, y
Skin creation - Menu questoni by CDMeyer
I have a skin and when I add more menu items to the nav bar than can fit in one row of nav, the seco
RE: FCK Editor in DNN 6 by Pingle2009
Just to follow on from Joe's reply, the 'official' line seems to be that not only that the old FCK E
RE: Slice a Site by Dan Glanton
Thanks, I'll look into that when I get a chance.
RE: Creating structured page content by Stephen Bugden
Thankyou very much Joe, I will take a look at your suggestions.
RE: Subpages or dropdowns navigation is going behind this flash by Joseph Craig
I googled a bit and found that this is a messy problem. Possibly the best solution will be to giv
RE: Subpages or dropdowns navigation is going behind this flash by vijendra
Pls check the attachment. That Iframe code we are using and subnavigations are goind behind that.
RE: Rename or move site from domain name to subdomain name by Bill Quinn
Hi Joseph, Thank you so much for your reply. I will be able to implement this later in the we
RE: Creating structured page content by Joseph Craig
Take a look at the DotNetNuke Reports Module, the DotNetNuke Form & List Module, SGSV from Tresslewo
RE: Subpages or dropdowns navigation is going behind this flash by Joseph Craig
It looks like your iframed content may have a z-index that puts it on top of the menu. I can't id
Subpages or dropdowns navigation is going behind this flash by vijendra
Hi, Subpages or dropdowns navigation is going behind this flash. Pls check the url below http://www.
RE: user adding images by rod lloyd
That worked, thank you. I did not expect those permissions to be in File Manager. I note a
RE: Unable to Create Skin Package by Joseph Craig
To be quite honest, I've never used this functionality to create a skin. What I usually do is cre
RE: Unable to Create Skin Package by Joseph Craig
I'm confused by this, too.
RE: Unable to Create Skin Package by schilders
We are running DNN 6.x
RE: Unable to Create Skin Package by Joseph Craig
Which version of DotNetNuke are you using?
You are not logged in.
You must log in to access all 
650+ videos, tutorials, podcasts, and more.
RSS Feeds