Ask a Question related to ASP.NET General, Design and Development.
-
Mark #1
Regular Expression for multiline validation
To validate the length of a multiline textbox, I'm told that I have to use a
regular expression validator. The regular expression below limits it to 25
characters in length, but if the user enters a hard return, it bombs
regardless of length. How do you allow hard returns in the following
regular expression? Thanks in advance!
^.{0,25}$
Mark
Mark Guest
-
Regular expression validation
Has anyone figured out a way to use regex in a flash form?? I have tried something like this inside cfformitem tags: function doRegExpVal():void{... -
Regular expression help
Hi, I'm pretty new to regular expressions. Before, I used to write long-winded and buggy segments of code with PHPs string functions to extract... -
regular expression - help
can anyone translate this into plain english? preg_match_all("/(\w+)+/U", $text, $words); -
Regular Expression Help please
All, I have this regular expression which a guy here provided yesterday, this regexp parses an executable name from a log file, however it only... -
[PHP] REGULAR EXPRESSION HELP
John wrote: Your "newline" may be \r\n or \r instead of just \n. -- ---John Holmes... Amazon Wishlist:... -
Sonali.NET[MVP] #2
Re: Regular Expression for multiline validation
Take a look @ Tips and Trick Section Recent Validating MaxLength of the TextArea using CustomValidator
[url]http://www.aspnet101.com/aspnet101/tips.aspx[/url]
"Mark" <field027_nospam_@umn.edu> wrote in message news:eMrfWiqWDHA.2880@tk2msftngp13.phx.gbl...> To validate the length of a multiline textbox, I'm told that I have to use a
> regular expression validator. The regular expression below limits it to 25
> characters in length, but if the user enters a hard return, it bombs
> regardless of length. How do you allow hard returns in the following
> regular expression? Thanks in advance!
>
> ^.{0,25}$
>
> Mark
>
>Sonali.NET[MVP] Guest
-
S. Justin Gengo #3
Re: Regular Expression for multiline validation
Mark,
Sorry, I took that expression from another forum's post. I had never
actually tested it myself. My bad. I just played around a bit. Try this
instead: ^[\s\S]{0,10}$
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
[url]www.aboutfortunate.com[/url]
"Out of chaos comes order."
Nietzche
"Mark" <field027_nospam_@umn.edu> wrote in message
news:eszTJArWDHA.2328@TK2MSFTNGP12.phx.gbl...use> That looks great for server side validation, but what about client side?
> Thanks.
>
> Mark
>
> "Sonali.NET[MVP]" <xb_sonalix@hotmail.com> wrote in message
> news:ug9Nq9qWDHA.2352@TK2MSFTNGP12.phx.gbl...
> Take a look @ Tips and Trick Section Recent Validating MaxLength of the
> TextArea using CustomValidator
>
> [url]http://www.aspnet101.com/aspnet101/tips.aspx[/url]
>
>
>
> "Mark" <field027_nospam_@umn.edu> wrote in message
> news:eMrfWiqWDHA.2880@tk2msftngp13.phx.gbl...> > To validate the length of a multiline textbox, I'm told that I have to25> a> > regular expression validator. The regular expression below limits it to>> > characters in length, but if the user enters a hard return, it bombs
> > regardless of length. How do you allow hard returns in the following
> > regular expression? Thanks in advance!
> >
> > ^.{0,25}$
> >
> > Mark
> >
> >
>
S. Justin Gengo Guest
-
Eric #4
Re: Regular Expression for multiline validation
Use a regular expression validator with the expression "(.|\r|\n){0,255}"
replacing the 0 and 255 with the minimum and maximum lengths that you need.
"Mark" <field027_nospam_@umn.edu> wrote in message
news:eMrfWiqWDHA.2880@tk2msftngp13.phx.gbl...a> To validate the length of a multiline textbox, I'm told that I have to use> regular expression validator. The regular expression below limits it to 25
> characters in length, but if the user enters a hard return, it bombs
> regardless of length. How do you allow hard returns in the following
> regular expression? Thanks in advance!
>
> ^.{0,25}$
>
> Mark
>
>
Eric Guest



Reply With Quote

