SELECTED ANSWER
replied on January 12, 2024
It depends on how robust you need it to be and what might appear as possible inputs. A fairly naïve, straightforward approach that might work for you is this:
Path
.*/
This regex says "capture everything, including slashes, until you find a slash" (and due to the fact that regex are "greedy" by default, it'll capture everything before the last slash). If there are no slashes, the pattern will have no matches. The .* says "0 or more characters" (including slashes), and the slash says there must be a literal slash character at the end.
File
[^/]+$
This pattern says "capture all text-that-is-not-a-slash and that is connected to the end of the string". The [ ] mean "custom character class", in this case, we're saying "any character except slash" (the ^ means "except"). The + quantifier says there should be at least one character. The $ is an "end of input" anchor--without it, the pattern matches "Folder1" in your example.
Disclaimer: these patterns may match too much or too little, depending on what inputs they receive--it's impossible to make them more robust without more information (more inputs, assumptions that can be made, the source of the file paths, etc.).