Find a way to don't match urls containing @ in regex?

Well, you can always first check if your url contains using indexOf() a string method. If it returns a number other than 1 your url contains If it doesn't, proceed using your regex.

Well, you can always first check if your url contains @ using indexOf(), a string method. If it returns a number other than -1, your url contains @. If it doesn't, proceed using your regex.

Edit: you can use this code: if( myString. IndexOf('@') == -1 && myString. Match(regexp)) { return true; } else { return false; } Which can be further shortened to: return myString.

IndexOf('@') == -1 && myString. Match(myString); Thanks goes to @idealmachine for providing this code faster than me.

1 for not extending the regex to an even less readable mess. – elusive Nov 26 '10 at 9:27 Could you please give me an example of this? Here is my code: regexp = /((ftp|http|https):\/\/)?(\w+:{0,1}\w*@)?(\S+)(:0-9+)?(\/|\/(\w#!

:.?+=&%@! \-\/))? /; if(myString.

Match(regexp)){ return true; } else { return false; } – Guest Nov 26 '10 at 9:41 1 An example would be: return myString. IndexOf('@') == -1 && regexp. Test(myString); – PleaseStand Nov 26 '10 at 10:25.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send