The length method returns the length of the match. You can also retrieve the length of sub matches by specifying the submatch parameter.
length( [ submatch ] )
| Argument | Description |
|---|---|
submatch
|
(number) The sub match to return the length of, starting at 1 for the first sub match. With the default value of 0 the length of the whole match is returned. |
(Number). The length of the sub match.
|
|