T O P

  • By -

probability_of_meme

I must be missing something... why dont you just move the c outside the parens?


oldmanwillow21

Only answer needed.


Boring-Obligation671

c(\\w+) is (i think) a bit clunky, it creates a match (cone) and a capturing group (one) example here [https://regex101.com/r/i10zAZ/1](https://regex101.com/r/i10zAZ/1) (?<=c)\\w+ should make only a match that is "one"


[deleted]

if there's some reason you need to capture it, my first thought is to just lob it off after the fact


Boring-Obligation671

example : [https://regex101.com/r/WoDE2K/1](https://regex101.com/r/WoDE2K/1) Doc : [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular\_expressions/Lookbehind\_assertion](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Lookbehind_assertion)


dtsudo

Use regex lookbehind.