30秒学会 JavaScript 片段 – Regular Expressions Cheat Sheet
Anchors ^: start of the string or the start of a line in a multiline pattern $: end of the string or...
Anchors ^: start of the string or the start of a line in a multiline pattern $: end of the string or...
Returns the ISO format of the given number of seconds. Divide s with the appropriate values to obtai...
Removes non-printable ASCII characters. Use String.prototype.replace() with a regular expression to ...
Definition The Levenshtein distance is a measure of the difference between two strings. It is define...
Generates a string with the given string value repeated n number of times. Repeat the string n times...
Splits a multiline string into a list of lines. Use str.split() and ‘\n’ to match line breaks and cr...
Converts a comma-separated values (CSV) string to a 2D array. Use Array.prototype.indexOf() to find ...
Takes a number and returns it in the specified currency formatting. Use Intl.NumberFormat to enable ...
Pads a given number to the specified length. Use str.zfill() to pad the number to the specified leng...
Finds all the indexes of a substring in a given string. Use Array.prototype.indexOf() to look for se...