Re: regex error

2025-11-23 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 23 November 2025 at 15:04:53 UTC, Sergey wrote: On Sunday, 23 November 2025 at 14:46:51 UTC, Jabba Laci wrote: I understand that this is an open source project, but it's very strange that this bug hasn't been fixed for 10 years. It doesn't give a good impression about the future of t

Re: regex error

2025-11-23 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 23 November 2025 at 14:46:51 UTC, Jabba Laci wrote: On Sunday, 23 November 2025 at 14:36:44 UTC, user1234 wrote: Nothing, you've hit a documented issue see https://github.com/dlang/phobos/issues/10152. Thanks. I added a comment here: https://github.com/dlang/phobos/issues/10152 I

Re: regex error

2025-11-23 Thread matheus via Digitalmars-d-learn
On Sunday, 23 November 2025 at 12:43:05 UTC, Jabba Laci wrote: I'm working on an Advent of Code problem (2015, Day 5, Part 2), ... Since other users already established what's going on, and Paul Backus even replied with a solution in the bugzilla etc. Now I wonder if in this kind of problem

Re: regex error

2025-11-23 Thread user1234 via Digitalmars-d-learn
On Sunday, 23 November 2025 at 14:46:51 UTC, Jabba Laci wrote: On Sunday, 23 November 2025 at 14:36:44 UTC, user1234 wrote: Nothing, you've hit a documented issue see https://github.com/dlang/phobos/issues/10152. Thanks. I added a comment here: https://github.com/dlang/phobos/issues/10152 I

Re: regex error

2025-11-23 Thread Sergey via Digitalmars-d-learn
On Sunday, 23 November 2025 at 14:46:51 UTC, Jabba Laci wrote: I understand that this is an open source project, but it's very strange that this bug hasn't been fixed for 10 years. It doesn't give a good impression about the future of the language. Nothing to do with language (even though it's

Re: regex error

2025-11-23 Thread monkyyy via Digitalmars-d-learn
On Sunday, 23 November 2025 at 14:46:51 UTC, Jabba Laci wrote: On Sunday, 23 November 2025 at 14:36:44 UTC, user1234 wrote: Nothing, you've hit a documented issue see https://github.com/dlang/phobos/issues/10152. Thanks. I added a comment here: https://github.com/dlang/phobos/issues/10152 I

Re: regex error

2025-11-23 Thread Jabba Laci via Digitalmars-d-learn
On Sunday, 23 November 2025 at 14:36:44 UTC, user1234 wrote: Nothing, you've hit a documented issue see https://github.com/dlang/phobos/issues/10152. Thanks. I added a comment here: https://github.com/dlang/phobos/issues/10152 I understand that this is an open source project, but it's very

Re: regex error

2025-11-23 Thread user1234 via Digitalmars-d-learn
On Sunday, 23 November 2025 at 12:43:05 UTC, Jabba Laci wrote: [...] What am I doing wrong? The same regex works in Python. Nothing, you've hit a documented issue see https://github.com/dlang/phobos/issues/10152.

Re: regex error

2025-11-23 Thread Sergey via Digitalmars-d-learn
On Sunday, 23 November 2025 at 12:43:05 UTC, Jabba Laci wrote: returns an empty m1 object. What am I doing wrong? The same regex works in Python. Nothing wrong with the code. Previously it was already reported by the same AoC problem I think :) https://forum.dlang.org/thread/lqjffwcpzayznqlj

Re: regex error

2025-11-23 Thread Paul Backus via Digitalmars-d-learn
On Sunday, 23 November 2025 at 12:43:05 UTC, Jabba Laci wrote: auto m1 = matchFirst(s, regex(r"(..).*\1")); returns an empty m1 object. What am I doing wrong? The same regex works in Python. This is a bug, first reported in 2015: https://issues.dlang.org/show_bug.cgi?id=15489

regex error

2025-11-23 Thread Jabba Laci via Digitalmars-d-learn
I'm working on an Advent of Code problem (2015, Day 5, Part 2), and my code doesn't work in D. In Python I get the correct result. Here is a string: const s = "xdwduffwgcptfwad"; The instructions says: "It contains a pair of any two letters that appears at least twice in the string withou