Home

123includes3

123includes3 is a term used in programming education to illustrate string inclusion and substring matching. It is not a formal standard but a mnemonic that developers use to discuss how to determine whether a given string contains a specified digit or sequence. In its simplest form, the problem concerns whether the character '3' appears anywhere in a string; more generally, it can refer to checking for the substring '123' or for sequences of digits 1, 2, and 3 in a given order, possibly with other characters in between.

Common interpretations of the term range from exact substring searches to more flexible pattern matching. Applications

Examples used in instructional material are typically presented in increasing complexity. A simple case might test

Origin and reception are informal, tied to teaching practices in beginner programming courses and online coding

include
validating
user
input,
filtering
or
extracting
data
from
text,
and
teaching
basic
concepts
of
search
algorithms.
The
idea
also
appears
in
puzzle-oriented
tutorials
that
ask
learners
to
distinguish
between
containment
of
a
single
character,
a
specific
substring,
or
a
digit
sequence
with
gaps.
whether
'3'
is
in
a
string,
as
in
a
language
feature
like
the
includes
operator.
A
slightly
more
advanced
case
checks
for
the
literal
substring
'123'.
A
more
challenging
version
uses
a
regular
expression
to
determine
whether
the
digits
1,
2,
and
3
appear
in
that
order,
with
possible
intervening
characters.
communities.
See
also
substring
search,
includes
operator,
and
pattern
matching.