RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(.|\n){0,16}$
Description
Limit Length - limit the length of a text box or other area to contain any character plus new line
Matches
shorter than max
Non-Matches
string longer than max
Author Rating: Not yet rated. David Yack
Source [email protected]
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Christian Louboutin
Name: http://www.christianlouboutin1965.com/
Date: 10/17/2012 3:26:55 AM
Comment:
My brother recommended I might like this web site. He was totally right. This post actually made my day. You cann’t imagine just how much time I had spent for this info! Thanks! Christian Louboutin http://www.christianlouboutin1965.com/


Title: Christian Louboutin
Name: http://www.christianlouboutin1965.com/
Date: 10/17/2012 3:26:37 AM
Comment:
My brother recommended I might like this web site. He was totally right. This post actually made my day. You cann’t imagine just how much time I had spent for this info! Thanks! Christian Louboutin http://www.christianlouboutin1965.com/


Title: Just what I needed
Name: Brian
Date: 8/6/2008 4:54:36 PM
Comment:
David, I spent over 2 hours trying different combinations and looking for an example to validate textbox input to limit to a certain length. My original blew up when a new line was entered. Thanks!


Title: Just what I needed
Name: Brian
Date: 8/6/2008 4:54:28 PM
Comment:
David, I spent over 2 hours trying different combinations and looking for an example to validate textbox input to limit to a certain length. My original blew up when a new line was entered. Thanks!


Title: Just what I needed
Name: Brian
Date: 8/6/2008 4:52:32 PM
Comment:
David, I spent over 2 hours trying different combinations and looking for an example to validate textbox input to limit to a certain length. My original blew up when a new line was entered. Thanks!


Title: Worked for me
Name: Asher
Date: 11/29/2005 2:23:32 AM
Comment:
Not sure what the rest of you guys did but it worked fine for me.


Title: Limit Length
Name: smcmiata
Date: 6/1/2005 3:19:37 PM
Comment:
^(.|\n){0,16}$ didn't work for me either, but [\s\S]{0,255} does. Thanks!


Title: KK's Works, though
Name: CLS
Date: 4/20/2004 6:11:19 PM
Comment:
^(.|\n){0,16}$ didn't work for me, but [\s\S]{0,255} does. Thanks!


Title: doesn't work
Name: KK
Date: 10/24/2003 2:55:35 PM
Comment:
[\s\S]{0,255} try this.


Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials