Regular Expression :: Atleast One Character Between A-z Upper Or Lower Case
Jul 20, 2005
I need to check that the user as put in at least one character between a-z upper or lowercase in a name field. They can put in whatever they like but there as to be a character a-z in the string. How shall the test expression look like?
problem with accessKey attribute value p (lowercase) and P(uppercase) for different html buttons.. the browser unable to differentiate between upper and lowercase key ...
i have a simple form with two buttons, and i want to trigger these buttons with keyboard keys in combination with Alt key. for example Alt + P (uppercase) should trigger button 1 and Alt + p (lowercase) should trigger button 2
Browser: IE 8.0
here is the code... ----------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html>
[Code]....
here the behavior is strange, when i press Alt+P in keyboard, button1 is triggered and when i press Alt+Shift+P in keyboard, button2 is triggered ..
Code: var field01 = document.getElementById("Field01").value; field01[0] = field01[0].toUpperCase();
it doesnt work, the first letter of the field stays lower case BUT when I do this:
Code: alert (field01[0].toUpperCase());
then it converts the first character to uppercase, well only in the alert box, the actual one still unchanged.
so i figure thats because it needs to be triggered somehow, it wont work by assigning it. i cant use it as return. are there any trigger methods that would just let me capitalize the first letter without any pop ups or anything?
i am using the following regular expression for the validation of Email address /^.+@([?)[a-zA-Z0-9-.]+.([a-zA-Z]{2,3}|[0-9]{1,3})(]?)$/; but the problem is that if user enters any white space character while entering email address then email is considered as valid how ever we know that an email address can not contain any white space character i have tried a lot but could not get a correct regular expression
I want to write a javascript that converts the (each) first character occuring after space in a string to lower case e.g abc def ghi jkl to abc Def Ghi Jkl
I have tried document.getElementByID and then checking for spaqce by putting the element in the Array but it does not work.
The javascript below is looking for the word 'margaret thatcher' in the body and surrounding it with a link. It's lower-case but the script is ignoring the case so that won't matter. But, the problem is that because Margaret Thatcher is a proper noun, it will be capitalized in the body text yet replaced with lower-case text. How can I modify this script to look for the word while ignoring the case but use the same text it found as the replacement instead of using the text object?
It has to be flexible in that the extension can be either 4, 5, or 6 chars (.php, .html, .shtml for example) and needs to cater for and whether querystring parameters exist too.
--------------------------- Windows Internet Explorer --------------------------- <EMBED src=http://www.youtube.com/v/JTmM3jut05Q&hl=en&fs=1& width=500 height=200 type=application/x-shockwave-flash allowfullscreen="true" allowscriptaccess="always"></EMBED>
how can i get "src" value in above code using regular expression?
does anyone know how I can build a regular expression e.g. for the string.search() function on runtime, depending on the content of variables? Should be something like this:
var strkey = "something"; var str = "Somethin like this";
I need a regular expression that will validate a double quote comma delimited list where the odd entries are numeric and the even are alphabetical. Each pair must also be on a separate line. For example:
"1","Peter" "2","Paul" "3","Mary"
I've used the following expression to validate comma delimited lists, but without the double quotes, numeric/alpha pairing and line return restriction.
Normally I can write regular expressions decently well but for some reason I am having trouble getting this to work. I am validating form data and need to throw an error if there are ANY spaces in the field. abc123 is fine, abc 123 is not. Any character is fine, just not a space.
All I'm trying to do is delete the lines which don't contain a particular string. Actually a filter to edit a log file. I can find and replace a thing with null, but can't figure out how to find the lines which do not contain the thing.
Going further, I want to generalize and use a JavaScript variable containing the decision string, but first I need to worry about the not-within-a-line problem.