Is there a way to have a Regex statement search for a wildcard with a maximum length? For instance:
somestuff.*morestuff
If I wanted the above to match
somestuffblahmorestuff
but not
somestuffblahblahmorestuff
Is this possible?
In regex:
{n}
Matches the previous element exactlyn
times.
{n,}
Matches the previous element at leastn
times.
{n,m}
Matches the previous element at leastn
times, but no more thanm
times.
For example:
,\d{3}
matches ,876
, ,543
, and ,210
in 9,876,543,210
\d{2,}
matches 166
, 29
, 1930
\d{3,5}
matches 19302
in 193024
somestuff.{4,7}morestuff
{min, max} is the syntax to specify the number of repetition.