Optional characters

The question mark character (?) can be used to make the preceding character optional. For example, there might be a need to look for either the singular or plural form of a certain word:

'There are 23 sites in the domain' -match 'sites?' 

The regular expression will match the optional s if it can; the ? character is greedy. A greedy expression will match as many characters as it possibly can..

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.152.242