Posted On March 28, 2019

match

kimconnect 0 comments

– The match() method retrieves the matches when matching a string against a regular expression. Returns a Array of matches or null of none is found.
– Format: str.match(regex)
– Same as RegExp.exe() if regexp doesn’t have the /g flag
– Example:
var regex = /(.)\1+/g;
var str = “aab”;
console.log(str.match(regex));

logs [ ‘aa’, index: 0, input: ‘aab’ ]

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

How To Fix Windows Corrupted Profile

Error messages: - We can't sign into your account. This problem can often be fixed…

How to Analyze Inbound / Outbound Traffic

Connect to the PacketShaper by entering the following into your web browser:                packetshaper.kimconnect.com You will…

Chronos Time Clock Administration

How to Add Notes Configuration Manager Terminals Timekeeper Terminals right click - basic configuration Type…