p5.Table matchRow() Method
The matchRow() method of p5.Table in p5.js is used to find the first row that matches the given regular expression and returns a reference to that row. The column that the method uses to search the row can be specified as a parameter. The method only returns the first row of the possible matches even if multiple matches of the regular expression exist.
matchRow( regexp, column )
Parameters: This method accepts two parameters as mentioned above and described below:
- regexp: It is a String or RegExp object that specifies the regular expression to match.
- column: It is a String or number that denotes the column name or ID of the column.
Return Value: This method returns a p5.TableRow object which matches the given regular expression.
The example below illustrates the match Row() method in p5.js: