Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to make 'password' are not preceded and not followed by 'validate' in this string.

<input name="password" value="" maxlength="32" class="input-text required-entry validate-password" id="pass" type="password">

I just get password not followed by validate using this

password(?!.*validate)
Posted

1 solution

Probably (?!.*validate)password(?!.*validate), so it checks before and after.
 
Share this answer
 
Comments
resz9 29-Jul-12 16:37pm    
nope..i have tried it..it still choose the 'password' after 'validate'
Christian Graus 29-Jul-12 16:41pm    
I don't think you're being clear. I think you want it to only choose the password that is tied to the word 'validate', not the one later on ? You need to narrow down your search, for example, to break on whitespace. There are a number of regex test tools you can download, you should get one and work with it. you should also be more clear in your question. What exactly do you want to match and not match ? I think that writing your question more clearly will make you see the rules you need to apply to make it work, and if not, it will tell us what you want ( which is not clear now )
resz9 29-Jul-12 16:52pm    
Sorry for not being clear on this one. Im just new to this thing, have download editpadpro and trying myself using the 30 minutes Regex Tutorial and try some others tutorial. But still cant do this after some hours, so i asked here.

Let me get it more clear. I want to make a regex that choose a 'password' thats not preceeded and followed by 'validate' based on this string, so it will not choose this string if im using the regex.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900