Hey all I have a couple of regular expression questions that I would like to ask. I sort of asked this in the Perl forum (because I am a better perl programmer) but now I am going to ask it here.
I want to create a javascript object that will qualify (validate) data. I want to be able to concatenate 2 regular expressions,
# 1 no more than 8 charters
and cannot have any white spaces
So lets say I have a variable
I then run it through a regular expression
So this was a match because there was 8 digits and there was a space in it.
So I now have Two(2) questions for ya;
Question #1: Can I make One(1) if statement by contaminating the Two(2) regular expressions?
Question #2: I can I create a regular expression that will look to see if my variable is more than eight(8) characters and contains no white spaces.
From the 2 separate
regular expressions I want to make one(1) larger regular expression.
Thanks
-T
-How important does a person have to be before they are considered assassinated instead of just murdered?
-Need more cow bell!!!
I want to create a javascript object that will qualify (validate) data. I want to be able to concatenate 2 regular expressions,
# 1 no more than 8 charters
Code:
(^\w{0,8})
Code:
\s
Code:
var testData = "This is a test
Code:
var testData = "This is a test
var regExp1 = (^\w{0,8})
var regExp2 = (\s)
if(regExp1.test(testData) && regExp2.test(testData){
alet('Yes there was a match')
}
So I now have Two(2) questions for ya;
Question #1: Can I make One(1) if statement by contaminating the Two(2) regular expressions?
Question #2: I can I create a regular expression that will look to see if my variable is more than eight(8) characters and contains no white spaces.
From the 2 separate
regular expressions I want to make one(1) larger regular expression.
Thanks
-T
-How important does a person have to be before they are considered assassinated instead of just murdered?
-Need more cow bell!!!