dmikester1
dmikester12y ago

✅ – dmikester1 – 15-27 Mar 21

Is this a good room to ask a regex(in Javascript) question?
9 Replies
dmikester1
dmikester1OP2y ago
OK, so all I'm trying to figure out is how to match a single colon [:] or a space followed by a hyphen [ -] ? If it was just a colon or hyphen, i know I could do [:-].
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
dmikester1
dmikester1OP2y ago
sorry I mean a (colon) or (a space followed by a hyphen) does that make sense?
dmikester1
dmikester1OP2y ago
regex101
regex101: build, test, and debug regex
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET.
dmikester1
dmikester1OP2y ago
I am close there I don't want the last part in a seperate group i want it part of the match
ScriptyChris
ScriptyChris2y ago
Like this?
^[\s]?slide [\d]{1,2}(?:\:|\s-)
^[\s]?slide [\d]{1,2}(?:\:|\s-)
dmikester1
dmikester1OP2y ago
Yes, that works perfect! Thank you!
reactibot
reactibot2y ago
This question has an answer! Thank you for helping 😄 If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1087759378091884544
reactibot
reactibot2y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1087759378091884544 Question not getting answered? Maybe it's hard to answer, or maybe you asked at a slow time. Check out these resources for help asking a good question: https://stackoverflow.com/help/how-to-ask http://wp.me/p2oIwo-26