[squeak-dev] Question about VB-Regex

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Mar 30 17:23:31 UTC 2020

Well, I know that learning is a very subjective topic, but personally, I was very happy with learning all the regex stuff I needed by trial, error, and StackOverflow ;-)

I'm wondering how you can actually fill a book about this topic? Is that book about the actual implementation of a regex machine?

Take a cheat sheet like this (https://www.rexegg.com/regex-quickstart.html, it's just *any* cheat sheet) and you know 95 % of the syntax.

Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Chris Cunnington <brasspen at gmail.com>
Gesendet: Montag, 30. März 2020 17:10:09
An: John Pfersich; The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Question about VB-Regex

That’s an excellent suggestion. I forgot about that book. I had it over ten years (and several moves) ago. Thinking about it now, I seem to recall that Friedl was not just an expert, but quite conscientious about making the topic accessible. Thank you for the reminder. (And I also prefer books because I like to highlight things.)


On Mar 30, 2020, at 12:53 AM, John Pfersich via Squeak-dev <squeak-dev at lists.squeakfoundation.org<mailto:squeak-dev at lists.squeakfoundation.org>> wrote:

I know it’s a little old-fashioned to recommend a book, but you might learn a thing or two about regexes from Mastering Regular Expressions by Friedl. It’s an OReilly book. Mine’s copyright 2002, second edition, about 430 pages deep. Still on my reference shelf after 20 years.

For encrypted mail use jgpfersich at protonmail.com<mailto:jgpfersich at protonmail.com>
Get a free account at ProtonMail.com<http://ProtonMail.com>
Web: https://objectnets.net and https://objectnets.org
https://datascilv.com https://datascilv.org

On Mar 29, 2020, at 11:42, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de<mailto:Christoph.Thiede at student.hpi.uni-potsdam.de>> wrote:

Hi Regex friend :-)

I assume you are referring to Regex-Core (thanks for the clarification, Levente!).

Yes, regexes are indeed very nerdy fun, though I recommend to use them rarely in production stuff, they just don't provide a really good readability. I don't know how experienced you are with regex in general, but I can recommend you regex101.com<http://regex101.com> if you did not know it yet. I'm not sure what you are looking for in detail, but if you're interested in further examples, here are a few ones:

http://forum.world.st/The-Inbox-Tests-ct-429-mcz-td5113665.html#:~:text=allRangesOfRegexMatches (see #testUndefinedVariable and #testUnusedVariable).

In Regex-Core-ct.55 f., I extended the implementation of lookaround expressions in Smalltalk.

(This is a small piece of art:

'(?<=(?<!n''t\s+)l[o]ve\s+)\w+' asRegex matchesIn: 'I love Squeak. I don''t love C++. I love Smalltalk.'.

And in as near as possible future, I will commit support for \x and \p as described here<https://www.regular-expressions.info/unicode.html#:~:text=Unicode%20Categories>. Stay tuned!



Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org<mailto:squeak-dev-bounces at lists.squeakfoundation.org>> im Auftrag von Chris Cunnington <brasspen at gmail.com<mailto:brasspen at gmail.com>>
Gesendet: Sonntag, 29. März 2020 18:08:44
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Question about VB-Regex

You posted an #asRegex example in talking to Eliot about inlining recently. I’ve printed it out and plan to play with it next week.
If you have any more thoughts or examples using the VB-Regex package, I hope you’ll post some here. I’m very interested in this stuff.


On Mar 29, 2020, at 9:44 AM, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de<mailto:Christoph.Thiede at student.hpi.uni-potsdam.de>> wrote:

Hi all,

as you may have noticed, I have proposed some new features for Regex-Core in recent past, and I found a lot of fun in working with this clean architecture for which I still see a lot of potential for expansion (for example, I'm currently having basic support for Unicode matches in my pipeline, this is currently blocked by this thread<http://forum.world.st/Unicode-td5113495.html>. For the future, I also would like to consider named groups & depending features). But before I will invest unnecessary time into the Regex-Core package, I have one question:

Recently I stumbled upon VB-Regex, which looks very similar to Regex-Core. Has this been a predecessor of Regex-Core, is it a successor or are they two independent forks? I could not find any information about this topic on the web.
Is my assumption correct that Regex-Core is the regex "state of the art" within Squeak?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200330/f6e1173e/attachment.html>

More information about the Squeak-dev mailing list