The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,730 other followers

Archive for the ‘RegEx’ Category

GExperts: searching for case-insensitive “T*List.Create” but not “TStringList.Create”

Posted by jpluimers on 2019/05/02

Just learned that partial exclusion can be done with the case-insensitive GExperts Grep Search like this:

T[^s][^t][^r][^i][^n][^g].*List.*\.Create

This will skip TStringList.Create, but matches TMyList.Create.

I’d rather have done something like this, but the Delphi RegEx does not support negative lookbehind:

^ *[a-zA-Z0-9_]* *: *T(<!string)[a-zA-Z0-9_]*ListO? *;$

So the alternative is to search for this:

^ *[a-zA-Z0-9_]* *: *T[a-zA-Z0-9_]*ListO? *;$

then exclude all the case insensitive TStringList entries from it, however GExperts did not support that at the time of writing.

This is an intermediate that works for some of the times:

^ *[a-zA-Z0-9_]* *: *T[^s][^t][^r][^i][^n][^g][a-zA-Z0-9_]*ListO? *;$

–jeroen

^ *[a-zA-Z0-9_]* *: *T[^s][^t][^r][^i][^n][^g][a-zA-Z0-9_]*ListO? *$;
^ *[a-zA-Z0-9_]*: .T[a-zA-Z0-9_]*ListO? *;$;
^ *[a-zA-Z0-9_]* *: *T(?!string)[a-zA-Z0-9_]*ListO? *;$

Posted in Delphi, Development, GExperts, RegEx, Software Development | Leave a Comment »

RegExr: Online Regular Expression Testing Tool

Posted by jpluimers on 2018/11/19

[WayBack] Kevlin Henney – Google+ reminded me of RegExr. Then I found out I collected the below links in 2010, but never published them. Hopefully a few still exist. Let’s see… yup: all do, but archived just in case.

Some other links (that show how much the landscape changed in 8.5 years time):

–jeroen

Posted in Development, RegEx, Software Development | Leave a Comment »

aha (Ansi HTML Adapter) with clickable URIs

Posted by jpluimers on 2018/10/02

aha is great to generate HTML from ANSI text (i.e. the coloured output on a Linux console).

But it doesn’t generate clickable URIs (it can’t yet by itself as it only looks one character in the future).

The thread at https://github.com/theZiz/aha/issues/20 suggested a case-insensitive regex through sed but the exact suggestion failed for a few reasons I will explain below.

First the bash alias (requires both aha and perl):

Read the rest of this entry »

Posted in *nix, *nix-tools, bash, bash, Development, Perl, Power User, RegEx, Scripting, Software Development | Leave a Comment »

Regular Expression Crossword Puzzle – Gregable

Posted by jpluimers on 2018/09/26

A crossword puzzle designed for geeks, every single clue is a regular expression.

Source: [WayBackRegular Expression Crossword Puzzle – Gregable

No matter your take on RegEx, I think you will be amazed just looking at it.

Related:

Via:

–jeroen

Read the rest of this entry »

Posted in Development, RegEx, Software Development | Leave a Comment »

Regex – Does not contain certain Characters – Stack Overflow

Posted by jpluimers on 2018/06/01

I had to find strings containing ” of object”, but not starting with a “)”, so the regex became this:

[^)] of object

Source: [WayBackRegex – Does not contain certain Characters – Stack Overflow

–jeroen

Posted in Development, RegEx, Software Development | Leave a Comment »

 
%d bloggers like this: