Rebuild a Hidden String from Wildcard-Matched DOM Elements

Asked at Ramp · Coding Questions · Difficulty: Easy · Last asked Feb 26, 2026

A web page hides a string in fragments. Each fragment is stored in a `<b class="ref">` element, buried inside a fixed nesting of `section > article > div`, and each of the three wrapper elements carries a `data-*` attribute that holds a wildcard pattern. Rebuild the hidden string from the fragments whose wrappers match the three given patterns.

Loading the problem…