Regular - (. *) And with some basic things (. *?)

Today I learn regular expressions

1 * and?

Look at the most basic regular symbol ----  *? ------

* Wildcard matches zero or more characters

? Wildcard matches the file name of zero or one character

There are two classical terms lazy matching and greedy matching  involves two combined symbols wherein (*) and (* ?.)

 

 

 (*) Are greedy match on behalf of as many matches between the characters and therefore it h l and all the characters match out

 

 (. *?) Are lazy match as few characters, but matching to match all characters

 

 (. +?) Represents the number of characters to match the middle character is greater than or equal 1

 

 (. ??) This match is repeated once and zero times

The number of which we are also their own definition of

 . {n, m}? represents the number of n from the number of matched characters m

 

2. Regular of basic grammar

For ^ [0-9a-zA-Z _- ] + abcdef $

 

Guess you like

Origin www.cnblogs.com/Nlifea/p/11748647.html