Re: find regex in backward direction ?

2020-12-19 Thread Виталий Фадеев via Digitalmars-d-learn
On Sunday, 20 December 2020 at 04:33:21 UTC, Виталий Фадеев wrote: On Saturday, 19 December 2020 at 23:16:18 UTC, kdevel wrote: On Saturday, 19 December 2020 at 12:52:54 UTC, Виталий Фадеев wrote: ... "retro" possible when using simple expression "abc". For complex "ab\w" or "(?Pregex)" shoul

Re: find regex in backward direction ?

2020-12-19 Thread Виталий Фадеев via Digitalmars-d-learn
On Saturday, 19 December 2020 at 23:16:18 UTC, kdevel wrote: On Saturday, 19 December 2020 at 12:52:54 UTC, Виталий Фадеев wrote: Goal: size_t pos = findRegexBackward( r"abc"d ); assert( pos == 4 ); module LastOccurrence; size_t findRegexBackward_1 (dstring s, dstring pattern) { i

Re: Flag & byLine confusion.

2020-12-19 Thread Ali Çehreli via Digitalmars-d-learn
On 12/19/20 4:40 PM, Mike Parker wrote: >> 1. Yes.keepTerminator > > This is because of Yes is a struct with an opDispatch template that > "forwards" to Flag!"keepTerminator".yes. This is the preferred syntax > and will work with any Flag parameter. I use Flag a lot but I am always bugged by how

Re: Flag & byLine confusion.

2020-12-19 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 19 December 2020 at 23:16:00 UTC, Rekel wrote: Most confusing was the way the documentation (website & in-editor) used; 1. Yes.keepTerminator 2. KeepTerminator.yes 3. Flag!"keepTerminator".yes Your confusion arises from the fact that KeepTerminator is combining multiple distin

Re: Flag & byLine confusion.

2020-12-19 Thread Paul Backus via Digitalmars-d-learn
On Saturday, 19 December 2020 at 23:16:00 UTC, Rekel wrote: After reading most of the tour.dlang.org website, I was completely surprised & confused encountering 'KeepTerminator', a 'Flag' used by the File.byLine function. With no examples denoting how to use it. Most confusing was the way the

Flag & byLine confusion.

2020-12-19 Thread Rekel via Digitalmars-d-learn
After reading most of the tour.dlang.org website, I was completely surprised & confused encountering 'KeepTerminator', a 'Flag' used by the File.byLine function. With no examples denoting how to use it. Most confusing was the way the documentation (website & in-editor) used; 1. Yes.keepTermi

Re: find regex in backward direction ?

2020-12-19 Thread kdevel via Digitalmars-d-learn
On Saturday, 19 December 2020 at 12:52:54 UTC, Виталий Фадеев wrote: Goal: size_t pos = findRegexBackward( r"abc"d ); assert( pos == 4 ); module LastOccurrence; size_t findRegexBackward_1 (dstring s, dstring pattern) { import std.regex : matchAll; auto results = matchAll (s, pat

Re: Simple BeamUI project won't link

2020-12-19 Thread aberba via Digitalmars-d-learn
On Friday, 18 December 2020 at 19:15:16 UTC, Daren Scot Wilson wrote: On Wednesday, 16 December 2020 at 07:45:50 UTC, Ferhat Kurtulmuş wrote: On Wednesday, 16 December 2020 at 07:40:45 UTC, Ferhat Kurtulmuş wrote: This may be not your issue, but I could manage it to work by adding this line:

find regex in backward direction ?

2020-12-19 Thread Виталий Фадеев via Digitalmars-d-learn
We have: dstring s = "abc3abc7"; Source: https://run.dlang.io/is/PtjN4T Goal: size_t pos = findRegexBackward( r"abc"d ); assert( pos == 4 ); How to find regex in backward direction ?

Re: C++ or D?

2020-12-19 Thread Godnyx via Digitalmars-d-learn
On Thursday, 12 November 2020 at 09:35:10 UTC, hgriffin wrote: C++ is a really overloaded with features language. The burden of backward compatibility and source compatibility with C doesn't make it any better. But right now it's the only right choice for development. There are plenty of librar