It doesn't capture filename, it matches filename and extension and additionally captures extension without the dot. You must to capture filename and only filename.
Edit.
Seems that you tested it wrong. ;)
Viimeksi muokannut pskosinski - Maaliskuu 14, 2013 - 00:12:29
i see two problems whith your regex:
- you have two groups. one should be enough...
- how do you start a non-capturing group? hint: it's not ?=
capturing is done using capturing groups. that means if a string matches the pattern, then parts of that string can be captured using capturing groups...
i see two problems whith your regex:
- you have two groups. one should be enough...
- how do you start a non-capturing group? hint: it's not ?=
capturing is done using capturing groups. that means if a string matches the pattern, then parts of that string can be captured using capturing groups...
Why isn't it "?="?
My regex works fine on online demos, but I can't just get it to work on this challenge
"?:" Doesn't seem to have any effect on those demos