« first day (31 days earlier)      last day (16 days later) » 

5:36 AM
Good morning
 
 
1 hour later…
6:59 AM
Good morning.
https://en.wikipedia.org/wiki/Tox_(protocol)
https://en.wikipedia.org/wiki/XMPP
 
7:29 AM
Ok, there we go, I picked up XMPP
I ll set up everything and let you know
 
 
1 hour later…
8:36 AM
Oh, looked at my regexes again, by the way. In both two really dumb errors in...
Positive look-ahead for anything but February:
(?=.(01|0[2-9]|1[0-2]))
          ^
Notice? There's no gap in between 01 and first of 0[2-9]. Of course that must be:
(?=.(01|0[3-9]|1[0-2]))
(r2 in my link with both expressions...)
Similarly in first expression, r1:
(?!.02)30|(?!.(02|04|06|09|11))31
Bullshit.
Look-ahead then occurs as follows:
.0 2
30\.
^^  match
   ^ doesn't match
Of course we need to look ahead after having discovered 30...
30(?!.02)|31(?!.(02|04|06|09|11))
So dumb mistakes...
Sidenote: the negative lookahead would have prevented detecting 302...
 
 
3 hours later…
11:35 AM
I see
Ok
when you re here I ll send you the contact
so you can add me
I have set both pidgin, and a web client, great one, converse.js
 
12:09 PM
the last one is open source xmpp chat client
web one
 
 
1 hour later…
1:10 PM
Pidgin me too...
 
ok
so I send you the username
?
 
Sure...
 
I should delete it afterwards, or keep it here
?
 
If you don't delete, then anybody else could see it as well. If you care about or not is your choice...
 
got it
?
 
1:14 PM
Seeing you as "offline"...
 
1:45 PM
let's continue a bit here
So for the above regex
 
 
2 hours later…
4:02 PM
hello again!
anyways
so about the regex
can you give the formatted version
?
 
4:25 PM
regex r(R"raw(\d\d(\.(?=..\.)|/(?=../))\d\d[./]\d\d(\d\d)?)raw");
                                      ^
 
right
so for this one
this input:
Ftet30.02.1999
01.01.11_+L12.22.2121
09.18.1r11.30.67
there is this output:
30.02.1999
01.01.11
12.22.2121
11.30.67
so the lookbehind and lookahead works fine
but
Ftet30.02.1999
01.01.11_+L12.22.2121
09.18.1r11.30/67
but this only outputted this:
30.02.1999
01.01.11
12.22.2121
 
 
1 hour later…
6:03 PM
Well, that's fine so far. Then you should yet add a test case having two foward slashes...
There's no look-behind inside the regex, by the way, only look-ahead.
Look-behind didn't compile even the most simple one.
Well, no, it did compile, but produced a regex exception...
We might now re-build step by step the entire regex again and see when it starts to fail...
 
Ok
But
in cpp
cpp.sh
it worked
what might be the problem
@Aconcagua specifically for some compilers?
 
This was only cpp.sh output? What about MSVC? That's the one causing trouble...
 
I mean cpp.sh
is outputting correct result
 
We're only interested in MSVC. On cpp.sh the entire regex works fine already.
 
yes
 
6:13 PM
But we want to know what goes wrong with MSVC.
 
exactly
 
Maybe it's just not getting along with lookahead.
By the way: we can simplify the regex a bit...
Let's consider r2, then we check all valid values that can follow the DD part (or MM in in English format). So we should be able to just match the MM (DD) part with most simple ..
 
right
so instead of ., I use ..
for the lookahead
right
this is the VS one
 
allow for <0-29> if next is <01-12>
allow for <30> if next is !02 (!)
allow for <31> if next is 01|03|05|07|08|10|12
allow for <01-12> if next is <01-29>
allow for 02 if next doesn't start with 3 (!)
allow for 01|03|05|07|08|10|12 if next is 31
Solely the ones marked with exclamation mark needs to be adjusted!
Otherwise we'd allow for 02.40.1977 or alike.
<30> if next is 01|0[3-9]|1[0-2]
Ah, the 02 is wrong anyway...
Must be: 01|0[3-9]|1[0-2] if next is 30
As you see, switching from DD MM to MM DD just means inverting match pattern and look-ahead for all of the three...
 
yes
so the above is the simplified version right
?
 
6:32 PM
(0[1-9]|[12]\d)(?=.(0[1-9]|1[0-2])
30(?=.(01|0[3-9]|1[0-2]))
31(?=.(01|03|05|07|08|10|12))

(0[1-9]|1[0-2])(?=.(0[1-9]|[12]\d))
(01|0[3-9]|1[0-2])(?=.30)
(01|03|05|07|08|10|12)(?=.31)
All these 6 combined with | and packed into parentheses...
<DD/MM with lookaheads><period or slash with lookahead>..[./]\d\d(\d\d)?
And we'd need to add begin and end conditions.
But maybe we wouldn't want to match .20.02.2020. ?
That could be part of 20.20.02.2020!
Or /20.20.2020/?
That could be part of 20/02/20.02.2020
Which date should we match then???
So instead of \D, I propose [^./\d]
 
I see
this?: regex r(R"raw(((?=(^|[^./\d]))(0[1-9]|[12]\d)(?=.(0[1-9]|1[0-2]))|30(?=.(01|0[3-9]|1[0-2]))|31(?=.(01|03|05|07|08|10|12))|(0[1-9]|1[0-2])(?=.(0[1-9]|[12]\d))|(01|0[3-9]|1[0-2])(?=.30)|(01|03|05|07|08|10|12)(?=.31))[./]\d\d(\d\d)?(?=($|[^./\d])))raw");
 
Wondering:
10.12.1210
That would match first and fourth OR part.
It's in both '<01-29> if next <01-12>' and in '<01-12> if next <01-29>'!
Maybe MSVC doesn't get along with that???
And actually, we could shorten second one to <01-12> if next is <13-29>, or as simpler, <10-29>, which is only [12]\d
 
6:47 PM
@Aconcagua maybe, it's a good note
 
If that's really true, then we'd need <13-29>, otherwise we can use simpler <10-29>...
 
at least this past one
regex r(R"raw(((?=(^|[^./\d]))(0[1-9]|[12]\d)(?=.(0[1-9]|1[0-2]))|30(?=.(01|0[3-9]|1[0-2]))|31(?=.(01|03|05|07|08|10|12))|(0[1-9]|1[0-2])(?=.(0[1-9]|[12]\d))|(01|0[3-9]|1[0-2])(?=.30)|(01|03|05|07|08|10|12)(?=.31))[./]\d\d(\d\d)?(?=($|[^./\d])))raw");
correct?
 
So far, yes.
At least if I haven't overlooked something...
 
Ftet30/02/1999
01.01.11_+L12.22.2121
09.18.1r11.30.67
output:
 
Wait, you have only the DD part inside.
MM is yet missing!
Be aware that look-ahead is not part of the match!
And fifth (begin included) look-ahead can be simplified to [12]\d, as 0[1-9] part is already covered by first selection.
<DD/MM>(\.(?=\d\d\.)|/(?=\d\d/))..\.\d\d(\d\d)?
 
7:04 PM
but before
your last note about simplification
 
> And actually, we could shorten second one to <01-12> if next is <13-29>, or as simpler, <10-29>, which is only [12]\d
'second one' was the second cited one.
 
regex r(R"raw(((?=(^|[^./\d]))(0[1-9]|[12]\d)(?=.(0[1-9]|1[0-2]))|30(?=.(01|0[3-9]|1[0-2]))|31(?=.(01|03|05|07|08|10|12))|(0[1-9]|1[0-2])(?=.([12]\d))|(01|0[3-9]|1[0-2])(?=.30)|(01|03|05|07|08|10|12)(?=.31))[./]\d\d(\d\d)?(?=($|[^./\d])))raw");
?
fifth one?
 
In simplified version, you don't need parentheses any more...
(?=.[12]\d) is fine...
 
I see
still DD MM
 
You have now:
<DD/MM>[./]\d\d(\d\d)?
You need:
<DD/MM>(\.(?=\d\d\.)|/(?=\d\d/))..[./]\d\d(\d\d)?
                                ^^ <MM/DD>
Entire format:
<DD/MM>[./]<MM/DD>[./]<YYYY>
(I didn't want to use DD only for first two digits, as in English format, this is MM...)
 
7:22 PM
I see
 
<DD/MM>(\.(?=..\.)|/(?=../))..[./]\d\d(\d\d)?
That would be fine, too: We don't need to check for digits, as we did in first set of look-aheads...
Hm...
<DD/MM>(\...\.|/../)\d\d(\d\d)?
That's even simpler...
The look-aheads of <DD/MM> already assured that there can only be the right digits...
 
let s stick to this
<DD/MM>(\.(?=..\.)|/(?=../))..[./]\d\d(\d\d)?
and then we go for <DD/MM>(\...\.|/../)\d\d(\d\d)?
 
Why not second one right now? It's much simpler, and <DD/MM> is not affected by.
 
a bit confused
... points ?
 
\. + . + .
Period followed by two arbitrary characters.
 
7:30 PM
Isee
regex r(R"raw(((?=(^|[^./\d]))(0[1-9]|[12]\d)(?=.(0[1-9]|1[0-2]))|30(?=.(01|0[3-9]|1[0-2]))|31(?=.(01|03|05|07|08|10|12))|(0[1-9]|1[0-2])(?=.([12]\d))|(01|0[3-9]|1[0-2])(?=.30)|(01|03|05|07|08|10|12)(?=.31))(\...\.|/../)\d\d(\d\d)?(?=($|[^./\d])))raw");
this is it
right
 
The look-aheads before assured already that there can only be the correct digits, so no need to chedk again.
 
without MM DD
 
MM DD is covered already.
That's why I wrote <DD/MM>
<DD/MM>.<MM/DD>.<YYYY>
As <DD/MM> has all the lookups contained already, <MM/DD> collapses to simply ..
<01-29> if next is <01-12>         (DD.MM)
30 if next is 01|0[3-9]|1[0-2]     (DD.MM)
31 if next is 01|03|05|07|08|10|12 (DD.MM)

<01-12> if next is <10-29>         (MM.DD; subset of not covered by first DD.MM)
01|0[3-9]|1[0-2] if next is 30     (MM.DD)
01|03|05|07|08|10|12 if next is 31 (MM.DD)
Remember?
 
OMG
I really got confused
 
7:59 PM
now, this is the regex
regex r(R"raw(((?=(^|[^./\d]))(0[1-9]|[12]\d)(?=.(0[1-9]|1[0-2]))|30(?=.(01|0[3-9]|1[0-2]))|31(?=.(01|03|05|07|08|10|12))|(0[1-9]|1[0-2])(?=.([12]\d))|(01|0[3-9]|1[0-2])(?=.30)|(01|03|05|07|08|10|12)(?=.31))(\...\.|/../)\d\d(\d\d)?(?=($|[^./\d])))raw");
These:
<01-29> if next is <01-12> (DD.MM)
30 if next is 01|0[3-9]|1[0-2] (DD.MM)
31 if next is 01|03|05|07|08|10|12 (DD.MM)
Are implemented
and these are implemented as well:
<01-12> if next is <10-29> (MM.DD; subset of not covered by first DD.MM)
01|0[3-9]|1[0-2] if next is 30 (MM.DD)
01|03|05|07|08|10|12 if next is 31 (MM.DD)
what should I add?
 
Nothing?
 
nothing
?
 
Regex is complete now...
 
right
 
At least if not having overlooked some error.
 
8:08 PM
but the output
is correct
right
 
It works nicely with all my personal test cases...
 
yes
it works on visual studio
 
MSVC?
 
yes
too
but the judge fails first test case
!!!
 
Hm...
Again question if they have 31.11 or similar somewhere...
Or maybe we are too strict with begin and end conditions?
Is their first test case the one we based our own tests on?
 
8:12 PM
yes
Ok
WA2
sorry overlooked
WA2
not 1
so now till I have the second test case
tomorrow I ll get it
it's not something now
it ll be just some modification
 
Our regex is stricter than actually required.
 
yes
because their statement
 
<01-29> for February, <01-31> for all others...
 
exactly
maybe we should allow that
but
till we get second test case
 
> Again question if they have 31.11 or similar somewhere...
 
8:15 PM
let us give it a try
?
 
Mentioned several times already...
We might.
 
we would remove the 30 case
 
No.
We'd remove the 31 case and modify the 30-case to 3[01].
 
meaning this: regex r(R"raw(((?=(^|[^./\d]))(0[1-9]|[12]\d)(?=.(0[1-9]|1[0-2]))|30(?=.(3[01]|0[3-9]|1[0-2]))|(0[1-9]|1[0-2])(?=.([12]\d))|(3[01]|0[3-9]|1[0-2])(?=.30))(\...\.|/../)\d\d(\d\d)?(?=($|[^./\d])))raw");

?
 
std::regex r3(R"raw(((?=(^|[^./\d]))(0[1-9]|[12]\d)(?=.(0[1-9]|1[0-2]))|3[01](?=.(01|0[3-9]|1[0-2]))|(0[1-9]|1[0-2])(?=.([12]\d))|(01|0[3-9]|1[0-2])(?=.3[01]))(\...\.|/../)\d\d(\d\d)?(?=($|[^./\d])))raw");
 
8:28 PM
aah
that was a stupid interpretation or assumption from me
WA2
test case it seems
WTF
but in any case
Ah, I want to say that pidgin does read correct formatted text
I read about it,
but sometimes its buggy
now that we have all necessary info in hand, if you can please ask for the deletion of this room, and create one, if you can name it, peekings :D
and if you have another criteria for being able to peek into some other online similar to stackoverflow in your work when you re free
please tell me
Or I have an idea
which for me seems the best of all
and it ll be great for you too to stay working in the same area
like creating a chat here chat.stackexchange.com/rooms
that would be ok for you
but the important thing is to delete this one
 
8:57 PM
deleting this chat because there are references to teacher, and this chat.stackexchange.com/rooms would be really great
Thank you so much for help, today I got some legalization papers for applying to Italy too
so next year would be europe, close to home :D
Now it's 4 am, so I ll go to sleep, if there is anything, please pidgin,
 
Then congratulations.
 
Thank you
yes, but still looking to canada
 
And good night, sleep well.
 
if i don't get the visa, then italy
south
since you re here, what do you think of the above
chat.stackexchange.com/rooms
creating a chat room here
instead
?
 
Stackoverflow is just a sub-site of stack-exchange. Same design, same concepts, same company behind. So there is not really different from here...
 

« first day (31 days earlier)      last day (16 days later) »