java - What does the provided regexp match? -
i've got regex i'm not sure {1,} stands for. full regex next: ^.{1,}$.
^.{1,}$ matches strings have atleast one of any(non-newline) character.
it same as: ^.+$
the general form of limiting quantifier is:
{min,max} means minimum of min repetitions not more max repetitions.
you can drop max part thereby specifying lower limit on number of repetitions , no bound on upper limit: {min,}
in case {1,} means 1 or more repetitions.
Comments
Post a Comment