question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for regex in `EffectFactory.matchPath`

See original GitHub issue

Can I use regex in the marble routes?

I know that are some especial chars that I can use like:

EffectFactory
  .matchPath('/:dir*')

But what about more complex regex?

EffectFactory
  .matchPath(/^\/(api|rest)\/.+$/)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
JozefFlakuscommented, Oct 21, 2018

@zeucxb fixed with v1.1.1 patch 💪

2reactions
zeucxbcommented, Sep 21, 2018

Yeah @krzysztof-miemiec it works. Awesome!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regex to match path containing one of two strings
What's with the negative lookahead? This is a simple, if not trivial, positive match. ^/content/au/(?:millenial|boomer)(?:/|$).
Read more >
How to use the @marblejs/core.combineRoutes function in ...
To help you get started, we've selected a few @marblejs/core. ... import { combineRoutes, EffectFactory } from '@marblejs/core'; import { authorize$ } from ......
Read more >
Regular Expression (Regex) Tutorial
Regex is supported in all the scripting languages (such as Perl, Python, PHP, and JavaScript); as well as general purpose programming languages such...
Read more >
pillarjs/path-to-regexp: Turn a path string such as `/user - GitHub
The pathToRegexp function will return a regular expression object based on the provided path argument. It accepts the following arguments: path A string,...
Read more >
Regular expression (regex) reference - Pexip Infinity Docs
Character Description Example . Matches any single character. a.c matches aac, abc, azc, a2c, a$c e... \d Matches a decimal digit character (i.e. 0‑9). a\d...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found