Hi,
I'm trying to validate a system path. This path is valid if it begins with some dirs and don't contain two dots one another.
#valid path
/home/user/somedir/somedir_2
#evil path
/home/user/../somedir_2/
I know how to check for two dots in a path:
\.\. or [\.]{2}
But I really want to do something like that:
/home/user/<match everything but two dots>/somedir_2/
so that "match everything but two dots" can be everything but two dots.
I have tried:
/home/user/[^\.{2}]*/somedir_2/
but without any success.