containerise icon indicating copy to clipboard operation
containerise copied to clipboard

Help with Syntax

Open jkozlow3 opened this issue 2 years ago • 7 comments

Hi there. I created 2 bookmarks to the same site (different logins for each person) and I added a hashtag to the URL of each bookmark followed by each person's name, thinking I could use Containerise to open each bookmark in a separate container. For example:

https://app.composer.trade/portfolio#vera https://app.composer.trade/portfolio#jason

Am I able to use Containerise to open bookmark 1 in the "Vera" container and bookmark 2 in the "Jason" container? If so, can you please assist me with the correct syntax? Or is there a better approach vs. the hashtag in the bookmark URL?

Thanks!

jkozlow3 avatar Aug 14 '23 03:08 jkozlow3

To match on a whole url like that it needs to be regex syntax, so start with an @, and add a \before any . (or other regex character like * or ? for example)

So you want:

@https://app\.composer\.trade/portfolio#jason , Jason
@https://app\.composer\.trade/portfolio#vera , Vera

AlexVallat avatar Aug 14 '23 18:08 AlexVallat

To match on a whole url like that it needs to be regex syntax, so start with an @, and add a \before any . (or other regex character like * or ? for example)

So you want:

@https://app\.composer\.trade/portfolio#jason , Jason
@https://app\.composer\.trade/portfolio#vera , Vera

Thank you so much Alex...this worked perfectly! Now I can manage multiple accounts easily!

jkozlow3 avatar Aug 14 '23 18:08 jkozlow3

What is the difference between !*.domain.com and *.domain.com?

tsbertalan avatar Sep 25 '23 18:09 tsbertalan

Basically, !*.domain.com works, and *.domain.com doesn't.

The ! prefix means use * patterns (ref), so without it just *.domain.com would match a theoretical domain that was literally https://*.domain.com, which I'm pretty sure can't exist.

AlexVallat avatar Sep 25 '23 19:09 AlexVallat

If the url has caps in it, how do I add it?

I know this is weird but it seems the regex takes capital letters into account by default

EDIT: Nevermind. The bookmark I was using had some capital letters in it, it seems they are sent with those to the extension and then I had the problem when it didn't detect it. Simple fix was editing the bookmark to not have those capital letters, as it is resolved the same way by dns servers and 'containerise' now correctly applies the container.

masterofobzene avatar Feb 10 '25 17:02 masterofobzene

Basically, !*.domain.com works, and *.domain.com doesn't.

brb, deleting all my redundant *.domain.com entries...

tsbertalan avatar Feb 10 '25 19:02 tsbertalan

If the url has caps in it, how do I add it?

@masterofobzene see https://github.com/kintesh/containerise/issues/120#issuecomment-2116002236

ipwnponies avatar Jun 10 '25 21:06 ipwnponies