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

Projects for Mystery Client in 2005

Mystery Client Technology Overview Last year Mystery Client upgraded to Microsoft Exchange 2003. This had…

How to Move Windows Partitions

Problem: Resolution: choco install partition-assistant-standard -y Click a few buttons > done. Result:  

Resolving Active Directory Replication Issues

In Windows Active Directory 2008+ mode, Distributed File System Replication  (DFSR) succeeds the legacy File…