Use \b to mark word boundaries.
\bBig2\b

--- In flexcoders@yahoogroups.com, "flexaustin" <flexaus...@...> wrote:
>
> I don't want to match just a word though.
> 
> So in my app I have two standard objects that the user can use, which are 
> named "Big" and "Small".  
> 
> The user can open "Big" make some changes to it then if they want to save 
> those changes I don't want them saving it as "Big" or "Small", but they can 
> save it as "Big2" or "new_Small". 
> 
> So if the user types in "Big" and tries to save it I want to catch this in 
> validation and then use the regexvalidator to color the textinput border red.
> 
> So if I just do a /Big/ or /Small/ then the user can't save it as "Big2" 
> because the regex will see the "Big" part in "Big2" and warn them "you can't 
> save it with this name". But "Big2" is valid not as it isn't just plain "Big"
> 
> TIA,J
>


Reply via email to