  The spatial and dynamical structure of star-forming regions can help provide
insights on stellar formation patterns. The amount of data from current and
upcoming surveys calls for robust and objective procedures to detect structure,
so the results can be statistically analysed and different regions compared. We
provide the community with a tool able to detect the small scale significant
structure, above random expectation, in star-forming regions, which could be
the imprint of the stellar formation process. The tool makes use of the one
point correlation function and of nearest neighbour statistics to determine the
parameters for the DBSCAN algorithm. The procedure successfully detects
significant small scale substructures in heterogeneous regions, fulfilling the
goals it was designed for, and providing very reliable structures. The analysis
of regions close to complete spatial randomness ($Q \in [0.7,0.87]$) shows
that, even when some structure is present and recovered, it is hardly
distinguishable from spurious detection in homogeneous regions due to
projection effects. Interpretation should thus be done with care. For
concentrated regions, we detect a main structure surrounded by smaller ones,
corresponding to the core plus some Poisson fluctuations around it. We argue
that these structures do not correspond to the small compact regions we are
looking for. In some realistic cases, a more complete hierarchical, multi-scale
analysis would be needed to capture the complexity of the region. We have
developed implementations of our procedure, and a catalogue of the NESTs
(Nested Elementary STructures) detected by it in four star-forming regions
(Taurus, IC 348, Upper Scorpius, and Carina), which are publicly available to
the community. Implementations of the 3D, and up to 6D versions of the
procedure including proper movements are in progress, and will be provided as
future work.
