http-rs / route-recognizer

Recognizes URL patterns with support for dynamic and wildcard segments
MIT License
100 stars 38 forks source link

Cannot capture full urls as params #55

Open gabrielfalcao opened 2 years ago

gabrielfalcao commented 2 years ago

Hey there, thanks for this cool library :)

I'm writing an application that needs to capture params that are paths. Is it possible to do it?

Example

    router.add(
        "/delete/:path",
        DeleteFileScreen
    );

Then I'd like to match something like this:

match router.recognize("/delete/home/user/example/foo/bar")

Essentially I would like something like Flask's PATH url converter: https://flask.palletsprojects.com/en/2.0.x/quickstart/#variable-rules.

Thank you