R
Reactiflux

help-js

✅ – dmikester1 – 15-27 Mar 21

Ddmikester13/21/2023
Is this a good room to ask a regex(in Javascript) question? 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 [:-].
UUUnknown User3/21/2023
Message Not Public
Sign In & Join Server To View
Ddmikester13/21/2023
sorry I mean a (colon) or (a space followed by a hyphen) does that make sense? https://regex101.com/r/MvOBYB/1 I am close there I don't want the last part in a seperate group i want it part of the match
SScriptyChris3/21/2023
Like this?
^[\s]?slide [\d]{1,2}(?:\:|\s-)
^[\s]?slide [\d]{1,2}(?:\:|\s-)
Ddmikester13/21/2023
Yes, that works perfect! Thank you!
UUUnknown User3/22/2023
3 Messages Not Public
Sign In & Join Server To View

Looking for more? Join the community!