Block to get the first match of some regular expression in a string

A feature I’d like to see in Hopscotch is:

A block which gets the first match of a regular expression in some string, like for example something like first match of ^([^,]*,){3} in -1,014,2,:tropical_fish:,fish would give you -1,014,2,

Here is an example design I’ve made:

Screen Shot 2020-06-15 at 2.03.32 PM

11 Likes

Ok, I can see this

2 Likes

Nice concept. It would probably make things easier :smiley:

1 Like

Wow! how do you make strings?

2 Likes

Welcome and hi!!

If you want to use strings, you have to have the subscription so you can enable the beta editor. Then just go to a variable and press the small button with an Aa text on it and you can make a text string!

3 Likes

Lol it’s these blocks that make Hopscotch seem more like coding. (I mean, in what coding language can you not use strings?)

6 Likes

based on my dictionary, null.

3 Likes

If I remember my college days correctly (mind you it was a long time ago), I believe FORTRAN 66 didn’t have string data types. And that’s a “real” programming language that was heavily used for numerical analysis (I.e., math and engineering applications) for many years.

6 Likes

ones with no strings attached

1 Like

Ah. I stand corrected, then.

Ha ha, very funny.

3 Likes

Wow, that seems intresting. Also wen u children be getting on hs??? Tell them they would get instant followers/likes cuz of ur fame, u could specifically show this post?

1 Like

Hopscotch is one

3 Likes

hopscotch specifically isn’t a language, it’s block coding

4 Likes

I see your point.

Scratch is a language though and also uses block coding

1 Like