This distinction also applies to word boundaries within a character string. This image shows how the a character string "dog cat" would appear in memory. The word boundaries are highlighted in red and the string boundaries are highlighted in green. You will note that the medial blank space is open -- it is not null. The leftmost green boundary is the beginning of the character string. The red boundary that follows it is the beginning of the first word.
Understanding the parameters of string boundaries and the boundaries of a string's contents, we can look at the metacharacters of regex formulation.

