I have a list of folders and files and I need a regexp that can match the following path and anything under it:
/path/to/folder1
So it should match:
/path/to/folder1
/path/to/folder1/sub1
/path/to/folder1/sub2/sub3
but it should NOT match:
/other/path/to/folder1
/path/to/folder2
Ok so far I have this:
^/path/to/folder1[something]*
but I don't know what to put in the brackets to match everything. I can do something like [0-9a-zA-Z] but that doesn't take into account backslashes and the possibilities of underscores, dashes, tildes... the list could go on and on. I could include all those in the regexp, but that would get tedious and I think there would be a better way.
/path/to/folder1
So it should match:
/path/to/folder1
/path/to/folder1/sub1
/path/to/folder1/sub2/sub3
but it should NOT match:
/other/path/to/folder1
/path/to/folder2
Ok so far I have this:
^/path/to/folder1[something]*
but I don't know what to put in the brackets to match everything. I can do something like [0-9a-zA-Z] but that doesn't take into account backslashes and the possibilities of underscores, dashes, tildes... the list could go on and on. I could include all those in the regexp, but that would get tedious and I think there would be a better way.