How to detect strings within brackets

I need to know how to detect strings within custom brackets of larger strings.
In case I'm being confusing (which is probably the case) I mean something like this:

[scratchblocks]
(find first text inside [(] [)] in [hello (world)]::operators)
[/scratchblocks]

I tried using the [scratchblocks] split [] by [ ]::operators reporter [/scratchblocks], but it got too confusing and complicated. Could someone help me?

Are they nested? hello (wo(rl)d)?

I was thinking if they were nested, it would ignore any of the brackets inside. Like
[scratchblocks]
find first text inside [(] [)] in [hello(wo(rl)d)]::operators reporter
[/scratchblocks]
would report wo(rl)d.

untitled script pic (1)
https://snap.berkeley.edu/snap/snap.html#present:Username=programmer_user&ProjectName=inside%20parens

https://repl.it/@18001767679/expect#main.py
The parseValue function is used to parse a JSON value.Use strings.("foo\"bar\\\"garply")
@helicoptur I would interpret that in side the brackets "wo(rl" because the ) closes the open bracket outside.
(Shhhhh i don't want this to spoil the 2nd day challenge for them)

Thank you so much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.