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

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -