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 2,420 other followers

Archive for the ‘Uncategorized’ Category

Space matching with sed is different from PCRE or other common regular expression parsers

Posted by jpluimers on 2021/07/14

On my research list: find out what is the cause of the difference below (Windows batch and Linux behave the same; just the quotes around the echo is different):

Windows statements:

echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org:8080 | sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^: ]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org:8080| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^: ]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org | sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^: ]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^: ]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo failure with [:\s]*?
echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org:8080 | sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^:\s]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org:8080| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^:\s]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org | sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^:\s]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^:\s]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"

Linux statements:

echo "cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org:8080 "| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^: ]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo "cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org:8080"| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^: ]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo "cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org "| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^: ]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo "cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org"| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^: ]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo failure with [:\s]*?
echo "cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org:8080 "| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^:\s]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo "cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org:8080"| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^:\s]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo "cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org "| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^:\s]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
echo "cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org"| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^:\s]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"

Output:

echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org:8080 | sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^: ]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
https://plastic.example.org/webui/repos/MyRepository/diff/changeset/2648

echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org:8080| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^: ]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
https://plastic.example.org/webui/repos/MyRepository/diff/changeset/2648

echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org | sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^: ]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
https://plastic.example.org/webui/repos/MyRepository/diff/changeset/2648

echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^: ]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
https://plastic.example.org/webui/repos/MyRepository/diff/changeset/2648

echo failure with [:\s]*?
failure with [:\s]*?

echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org:8080 | sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^:\s]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
https://pla/webui/repos/MyRepository/diff/changeset/2648

echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org:8080| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^:\s]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
https://pla/webui/repos/MyRepository/diff/changeset/2648

echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org | sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^:\s]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
https://pla/webui/repos/MyRepository/diff/changeset/2648

echo cs:2648@rep:MyRepository@repserver:ssl://plastic.example.org| sed -E -r -n "s/^cs:(.*?)@rep:(.*?)@repserver:([a-zA-Z][a-zA-Z+.-]*?):\/\/(\w[^:\s]*?)(:\d*)?.*$/https:\/\/\4\/webui\/repos\/\2\/diff\/changeset\/\1/p"
https://pla/webui/repos/MyRepository/diff/changeset/2648

Related:

–jeroen

Read the rest of this entry »

Posted in Uncategorized | 1 Comment »

Tidy First?

Posted by jpluimers on 2021/04/08

Reminder to myself to check out of the Tidy First? book by Kent Beck got out yet.

I discovered he was writing it after reading this tweet:

Like Extreme Programming, which I used before I even know about the term, Tidy First is my natural way of approaching code: step by step tidying small spots, so I get a feel on the why and how of the code. For me, tidying consists of very small refactorings. I am anxious to see what it means for Kent.

Related links:

–jeroen

Read the rest of this entry »

Posted in Uncategorized | Leave a Comment »

Like Circuit City and Radio Shack, Fry’s Electronics closed down. We all saw it coming, but: damn.

Posted by jpluimers on 2021/02/24

Posted in Uncategorized | Leave a Comment »

“I finally finished this awesome game called Photoshop, let me send you a video” – Raymond Chen

Posted by jpluimers on 2021/02/01

I finally finished this awesome game called Photoshop, let me send you a video [WayBackI finally finished this awesome game called Photoshop, let me send you a video – The Old New Thing

–jeroen

Posted in Uncategorized, Windows Development | Leave a Comment »

Apple M1 ARM based Mac as a developer: docker and brew will take a while to be working at all or supported

Posted by jpluimers on 2020/11/13

Important to consider as both a developer and end-user when switching architectures:

Is all my software working and supported on the new architecture.

For many Mac developers, at least docker and brew are important.

Bad news here:

  • Docker will likely take months before it runs, and then only support ARM images
  • Brew will likely take months to get supported.

Background links:

https://github.com/docker/for-mac/issues/4733

https://github.com/Homebrew/brew/issues/7857

Via:

Oh, there is plenty more that does not work yet or never will:

Apple MacBook Pro 13” M1 Review- Why You Might Want To Pass

https://www.forbes.com/sites/patrickmoorhead/2020/11/21/apple-macbook-pro-13-m1-reviewwhy-you-might-want-to-pass/amp/

Posted in Uncategorized | Leave a Comment »

 
%d bloggers like this: