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 (takes as much as possible).

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

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