Python Regex: Select everything between two brackets ignore brackets in between

I want to capture the entire sub-query irrespective of whether there’s a concat or substring function in between (i.e. ignore another bracket opening and closing within sub-query. (a) We don’t want to capture “join” as a word (b) “alias2” will not always be followed by “join” it can be anything (a word boundary, space, or “join” word).

Problem using HTML5 For Loop with flask and Python

I am trying to iterate through a list of tuples in my HTML code, and then use the first item in the tuple, containing the path of a image, to create a new image. The path to the image is 100% correct and when I plug in the path manually the image displays perfectly however when I use the code below it doesn’t display. Are there any workarounds for this?