Now we are making progress.
It looks like you are using PHP which in turn uses the PCRE regex library - that would have been useful to know (rather than references to "grep").
Now try changing your pattern to:
$pattern = "/\(\{\[\|(((?!\|\]\}\)).)+)/";
and then look at "result[1]" which will be an array containing all of the "somethingx" strings but without the leading marker sequence.
The '!' is not an operator in its own right - it is part of the '(?! )' lookahead. If yuo break down the revised pattern I've just given it becomes:
/\(\{\[\| - this is the literal match for the starting marker
( - start of capture group #1 - this will be the main target for extracting the text you are after
( - start of an inner matching group #2 - its purpose is to match each character at a time and have the quantifier have it repeat as many times as necessary
(?!\|\]\}\)) - this is a negative lookahead group. The '?!' at the start is part of the operator and the rest are the literal characters that need to be matched
. - the the lookahead lets us get this far then match the next character
)+ - the end of matching group #2 and the quantifier to make it repeat as often as possible
) - the end of capture group #1
Lookaheads are a fairly advanced concept with regex patterns. I like to think of them a bit like a subroutine in a program: the environment marks where you are, it goes off to do something and then comes back and carries on from the saved spot. The same is basically true with lookaheads: the text pointer is (in effect) saved and the pattern within the parentheses is used to test the characters that follow in the text; once the test has been completed then the previous environment is restored and the regex engine continues processing as before.
What a lookahead does is really make a "match/no-match" decision and is one of a group of "zero-width assertions". When a regex engine has a character such as 'D', it will try to match the next character in the text with a "D" - if it matches then the text pointer is moved on and the character is included in the current "match"; if it doesn't match then text pointer stays where it is and the pattern is checked to see if there are any alternative characters that should be tested. As you can see, when a match is made, the text pointer 'consumes" the matched character.
A "zero-width assertion" does almost the same thing but instead of moving the text pointer on a successful match, it only tests the next character(s) to see if they match. An example is the '$' operator that checks to see if the next character is a line terminator. If it is, then the line terminator character remains the next character .
A lookahead is exactly the same except that it can use a more complex pattern that you provide.
All of these assertions return a "match/no-match" result. There are 2 forms of lookahead that are referred to as "positive" and "negative". A positive lookahead will return a "match" of the entire lookahead pattern does match the next character(s) in the text.
A 'negative' lookahead is similar to the "not" expression in a program - it flips the "match/no-match" result from the lookahead pattern and returns that.
In this case we want to match each character but stop when we get to the "|]})" sequence. Therefore the lookahead pattern is used to check for exactly that character sequence but we want it to "match" if the next characters are NOT the exact sequence - therefore we need to use the negative lookahead.
I hope this all makes sense - as I said, lookaheads are regarded as an advanced topic and they can make your head spin as you try to understand them.
Susan