1.

What Are Quantifiers?

Answer»

The frequency or position of bracketed character sequences and SINGLE characters can be DENOTED by a special character. Each special character has a specific connotation. The +, *, ?, and $ flags all follow a character sequence.

  • p+: It matches any string containing one or more p's.
  • p*: It matches any string containing zero or more p's.
  • p?: It matches any string containing at most one p.
  • p{N}: It matches any string containing a sequence of N p's
  • p{2,3}: It matches any string containing a sequence of TWO or three p's.
  • p{2, }: It matches any string containing a sequence of at LEAST two p's.
  • p$: It matches any string with p at the END of it.
  • ^p: It matches any string with p at the beginning of it.

The frequency or position of bracketed character sequences and single characters can be denoted by a special character. Each special character has a specific connotation. The +, *, ?, and $ flags all follow a character sequence.



Discussion

No Comment Found