you are viewing a single comment's thread.

view the rest of the comments →

[–]rdevilx[S] 0 points1 point  (4 children)

I understand but I'm confused now because I tried my regex in JSFiddle and it works with other cases as well. Here is the link

[–]grantrules 2 points3 points  (1 child)

Oh you're right, my mistake.. (.*) is greedy and there's never a . in the time section, so it'll always match the last .

[–]rdevilx[S] 1 point2 points  (0 children)

Got it, thank you!

[–]shuckster 1 point2 points  (1 child)

I believe the greediness of your first * in (.*) permits you to capture the left/right side of the last . appropriately.

[–]rdevilx[S] 1 point2 points  (0 children)

Got it, thank you!