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.

matching triggers with _

See original GitHub issue

I have an external input that generates a trigger with an underscore in it, like qrscene_visademo

I’m trying to understand how this can be matched or gets converted inside rive. Rive cannot accept punctuation in triggers, correct? But I thought it would strip out all the _ from any inputs too?

So then how should I write a trigger?

qrscene_visademo -> qrscenevisademo

neither of these seem to match.

in debugging the triggers I see this:

Try to match "scene qrscene_visademo" against scene qrscene_visademo (scene qrscene([A-Za-z]+?)visademo)

So I’m not really sure what that expansion is? It looks like the regex code but … qrscene([A-Za-z]+?)visademo would remove any such _ commands?

I’m also going to experiment with this:

bot.unicodePunctuation = new RegExp(/[.,!?;:]/g);

which could maybe leave the incoming message untouched?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kirslecommented, Jun 13, 2016

Originally I used \w+ for that wildcard (which would likely also catch Unicode symbols), but \w also matches numbers which I wanted to avoid, so I changed it to [A-Za-z]+, but that only matches ASCII letters.

Maybe it would be better to make it match [^0-9]+ to instead exclude numbers rather than try to include all Unicode symbols.

0reactions
vunbcommented, Jun 14, 2016

👍 @kirsle 1 vote for excluding numbers and spaces. The expression [^\s\d]+ would be better for my unicode language. Thank you !

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is a match trigger? - Firearm Tutorials
Match triggers for AR-15 rifles often come with several different springs to achieve a shooters desired pull weight. The components used in ...
Read more >
PAT MC and Trigger Matching - CERN Twiki
The PAT trigger matching offers the opportunity to compare and associate PAT objects with trigger objects. It can identify objects which ...
Read more >
Implementing monitoring triggers and matching of triggered ...
Triggered monitoring in clinical trials is a risk-based monitoring approach where triggers (centrally monitored, predefined key risk and ...
Read more >
Hi-Speed National Match - Trigger Set - Geissele Automatics
The Geissele Match Trigger is a perfect Space gun add-on as the pull weight can be adjusted to low levels that enhance trigger...
Read more >
Triggers and rules · Cloudflare Zaraz docs
In most cases, your objective will be to create triggers that match specific website events that are relevant to your business. A trigger...
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