You Can Talk About Hopscotch Here; Topic 30 [OFFICIAL]

I have that bug

1 Like

Ah, yes. The Ultimate Guide to RegExp: A truly worthy tutorial…

Can you identify the following?

  • Common and General Tokens
  • Anchors
  • Meta Sequences
  • Quantifiers
  • ( ) Group Constructs
  • [ ] Character Classes

If so, you’re off to a great start.

1 Like

@CreationsOfaNoob

Know this project?
I updated it to now version and now it’s FTU
Sorry if you didn’t want to be tagged

Ah yes, 25:42:00 is totally normal /sarc

But seriously, though, it literally reads 25:42:00 for me, when it should be reading 19:42:00 (7 PM)…

You should calculate everything, then do modulo.

((12 + 2) % 13) returns 1, but ((12 % 13) + 2) returns 14 since 12 % 13 returned 12.

Speaking of, I just realized doing a modulo of 12 turns the time into 12hr time, whereas modulo 24 puts it in 24hr time.

And if (HR % 24) < 12, the time is AM.
Obviously, the only time that would read incorrectly are 12 AM and 12 PM
(To fix, do (((HR - is12HrTime) % (12or24HrTime)) + is12HrTime))

  • 12or24HrTime is a value of 12 or 24
  • is12HrTime is a Boolean variable (1 or 0)
  • if 12HrTime, it’ll return an hour from 1 to 12
  • if 24HrTime, it’ll return an hour from 0 to 23

Also timezone used by Unix timestamp is GMT (+0).

1 Like

I just made some code to make it look like 12 Hr Time. I’ll quickly edit it, so AM / PM shows up.

no :PP
or i simply dont know the name ( ← most likely the case)

1 Like

General tokens are things like \n, \t (which is a tab character btw), etc.

An example of an anchor is the start or end of a string.

  • ^ and $ are anchors, which marks the start or end of a string.

Meta sequences are things like . (any single character), \s, \d, \D, \S, \w, \W, etc.

  • capital letters means it negates what it usually matches. (\d = any number character, \D = any NON-number character)

Quantifiers are tokens that tell the regex how much of a character it should match

  • ? = 0 or 1, * = 0 or more, + = 1 or more, {5} = exactly 5, {4,} = 4 or more, {5,7} = 5 to 7
1 Like

ah ok, i know them all then - just not the names ;)

They have names?

1 Like

it looks like yes

They don’t, they are more known as classifiers.

The following tokens I know (that works in Hopscotch)

  • \n = new line
  • ( ) = capture group
    • currently bugged and doesn’t work correctly
    • current bug: capture groups are ignored, and sometimes matches fail completely when a match is supposed to occur.
  • [ ] = character class [a-z] matches a to z
  • ^ = start of string
  • $ = end of string
  • z? = 0 or 1 of z
  • a* = 0 or more of a (can lead to infinite matches)
  • a+ = 1 or more of a
  • \d = any numeral character
  • \s = any whitespace character
  • \w = any word character
  • . = any single character (except whitespace)
  • a|b = alternate; a or b
  • [a]{3,} = 3 or more of a
  • [a]{5} = exactly 5 of a
  • [a]{7,12} range of 7-12 of a

Nevermind. It’s actually working as intended.

(10,1) matches (0,1) is actually matching the 0,1 part of (10,1) since it’s set to match any part of the string.

However, (10,1) matches \(0,1\) does not match because the capture group function is escaped.

Also {0,1} will not work because this is a non-quantifiable token, and will return an error if there is nothing before it.

@Spy_Guy_96 ^^

1 Like

Oops lol

I thought that was normal
But I bet you can’t make a working clock with out user varibles:)

1 Like

Are you sure about that?

Made way before I bought the subscription (I got it around Jan 22, 2021, this project was made around August 2020)

1 Like

according to that thumbnail, you released the project at 4:37 a.m.

what

1 Like

It was published on August 11, 2020, at 12:37:34 AM

Looks like the thumbnail was taken at exactly 12:37:25 AM Eastern Time
The time shown is GMT. I’m in EDT.

oh yeah

i was wondering why it was telling me it’s two in the morning

1 Like

proceeds to put on sunglasses and look at you, pointing and nodding super coolly :sunglasses::sunglasses::sunglasses:


whats everyone coding?

2 Likes

bruh, you won this time:)

2 Likes

great question

3 Likes