.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

RegExp Password without accent and special characters

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :WPF
 

Hi everyone,

I'm looking for an expression that corresponds to the following criterias:

  • Length must be at least 6 characters, no more than 10 characters,
  • Must include at least one upper case letter,
  • Must include at least one lower case letter,
  • Must include at least one numeric digit,
  • Special characters (like %, #, and so on...) are not allowed,
  • Accented characters (é, à, ï, and so on...) are not allowed.

Here is my expression : ^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,10}$ It answers to the first four points above but not the last two ones. Does anybody has an idea to remove special and accented characters ?

Thank you so much for support.

AB




View Complete Post


More Related Resource Links

Problems Rendering Special Characters

  

Good afternoon ASP programmers,

I am creating an application that creates math problems for students.  I wish to use a special character for negation to differentiate it from the minus sign.  I am using the Unicode character U02c9. 

Negation

This is a composite screen shot of two problems. The top one is rendered in Fire Fox and the bottom one in IE.  I'd like to know how to change my JavaScript so that IE is rendered like Fire Fox.  I have created variables that I use for my special characters.

var symMul= "×";
var symDiv= "÷";
var symNeg= "?";

Both IE & Fire Fox correctly render the symDiv and symMul symbols. Any suggestion would be greatly appreciated.



 

 

 


DropDownList FindByText with Special Characters...?

  

I have a dropdownlist which I dynamically select a list item using findbytext as long as there are no special characters.  One entry in the list starts with a percent symbol which I have been unable to dyncamically select.  I have confirmed that there are no spaces in the list item and have hard coded the query with the string to try to find the problem.  FindByText("% Increase")    I believe it has something to do with the special character but have been unable to identify a method to work around this.  Any help would be appreciated.

VB

If Not ddlColumns1.Items.FindByText(strDefault) Is Nothing Then 
    ddlColumns1.Items.FindByText(strDefault).Selected =
True
End If


MySqlDataReader - Reading special column characters

  

Hi.

I have a MySQL database, which contains columns with danish characters like ø æ and å.

When the MySqlDataReader tries to read this column name:

for (int i = 0; i < MysqlReader.FieldCount; i++)
{
       string Key = MysqlReader.GetName(i);

}


The result is not the expected character, but some kind of ASCII value of it. For an example, 'å' gets interpreted as 'Ã¥'.

What to do?


Thanks alot for your help :)




special characters and php

  
  hi, sorry for my english my question is simple. I data (étude,première ...) in my database. I want to display in a web page. the problem is that I can not because for example (é tude) contains the letter é . So I have an error in my web page. when I remove the é everything goes well. nvarchar even does anything. thanks

How do you specify special characters as flat file delimiters?

  
I have a flat file that has fields delimited by tilde {~} and rows delimited by {CR}{LF}.  The problem is, my source is spitting out the {NULL} (&H00) at the end of the row. The data displays correctly in the pre-viewer (with a non-print symbol at the end of the last field), but gives an error when I try to run the package. Example: "data"~"data"~"data"{NULL}{CR}{LF} I can process the row in c# using: "\0\r\n" as the row delimiter.   What is the equivalent notation for SSIS?   Thanks,

Drag drop functinality not working on Explore View control for file containing special characters in

  
We have created a control which uses explorer view control for file drag and drop. This functinality works fine for a file having filename without special characters but it gives an error if we drag and drop a file having special characters in the file name. The reason for this is Sharepoint uses WebDAV protocol for file transfer to the Sharepoint document library and WebDAV protocol has limitation that it does'nt accept file with special characters. Please let me know the way how I can accomplish drag and drop of file with special characters in file name, onto Explorer View control with WebDAV.

Drag drop functinality not working on Explore View control for file containing special characters in

  
We have created a control which uses explorer view control for file drag and drop. This functinality works fine for a file having filename without special characters but it gives an error if we drag and drop a file having special characters in the file name. The reason for this is Sharepoint uses WebDAV protocol for file transfer to the Sharepoint document library and WebDAV protocol has limitation that it does'nt accept file with special characters. Please let me know the way how I can accomplish drag and drop of file with special characters in file name, onto Explorer View control with WebDAV.

how to concatenate special characters in TSQL ?

  
hi how can i insert special characters like ' to my select output ?? for example, i tried to get the following output but it just doesnt work.. i am using SQLS2K btw, SELECT ' Hi. this is called the 'modern age' ' note that i need those to ' s with the words modern age :)   thanks in advance :)

Filtering Special Characters Quickly From A String

  
I need to only allow (basically every key that you can see on the keyboard) and drop the rest. I would probably use a regular expression to do this but Im not that great with them at this time. Does anyone have an example of how to do this?

Writing French accent characters in ASP .NET Textbox

  
How to write French accent characters such as - é - in ASP/HTML text box? I can copy and paste it in the text box like I did now - so there is nothing wrong with the encoding - but the problem is how to type it (write it!).I also know that é in HTML mean &eacute; but cant know how this may help!Appreciate your help! Thanks,

I want to upload Folders which contain special characters into the sharepoint document library

  
I want to upload Folders which contain special characters into the sharepoint document library

SQL server 2005 +asp.net 4.0 +html special characters problems saving special characters

  

Hello all


Could I please ask - how do I go about inserting into a database special characters such as the uppercase O, umlaut 

Ö


Please understand that I have been able to insert the special character from inside MMS by putting an N in front of the value


but when I run the  SQL file from inside an ASP.net 4.0 page it comes up as a diamond with a question mark in it


Does anyone have any idea how I would be able to acheive this?



Regex: password must contain one number, one letter, and 0 or more special chars

  

I'm trying to validate a password, and I'm almost there, but need some help finishing it off. Here's what I need:

1) 6-10 characters

2) At least one alpha AND one number

3) The following special chars are allowed (0 or more): !@#$%

Here's what I have:

^.*(?=.{6,10})(?=.*[a-zA-Z])(?=.*\d)[a-zA-Z0-9!@#$%]+$

Passwords that should work: test1ng, abc123, abc1234567, 123abc, abc!123, !@#$%1abcd, !@#$%a9

Passwords that shouldn't work: a, 1, a1, 1$, %, abc!@#, 012345, a1234+, abcde, test*ng, abcde!, !@#$%!, a1234567890, testit!0987, 1abcdefghij

It works on all my test cases, except it allows "a1234567890", "testit!0987", and "1abcdefghij", none of which should be allowed, since they contain more than 10 chars. What am I missing?


Textbox - how to intercept special characters ?

  

I need to handle keypress Ctrl-1..9 and Alt1..9 when the focus is in a TextBox.

I have tried PreviewKeyDown on both the form and the derived TextBox class, but neither get called in the case of special characters.

I see one solution is to create and attach a routed command per key, but I'm wondering if there is any other way to do this?


special characters ofr queries

  

Hello everyone

I'm doing some queries with input values coming from textboxes.

So what might happen is that some one might write something like this:

' DROP tbl_users;

or use any characters (such as " ) that can generate MySQL errors leadingo to system breakdown;

What I need is a class that gets the input text and then parses the characters to an escape sequence, so that if an attempt of breaking down the system occurs like the previous the input parameter will appear like:

\'DROP tbl_users;

 

The reason I'm asking for help is because I'm using a method tha executes a query: something like this

        strquery = "CALL sp_insere_hist(" + Id_rec_hist + ", " + Id_serv_hist + ", " + Id_dp + ", " + Dt_entrada_hist + "," + Despacho + ", " + _nfunc.Text + ")";
        m.executasql(strquery);


Appreciate all your insites on the subject

Cheers

Francis

 

 


List of special characters in SQL Server 2005

  

Does Microsoft provide a list of T-SQL special characters in SQL Server 2005 that can be escaped?


Rename file having special characters when uploading to document library

  

Hi,

i am trying to use the ItemAdding event handler to capture the filename and rename it when uploading. But it doesn't work.

Does anyone have any idea which event should i consider OR is there any other solution??

Thanks


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend