Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
((?:\.[a-f0-9]{2}){2})
/
ig

Description

Match Wikipedia anchor dot-instead-of-percent encoding string.replace(/((?:.[a-f0-9]{2}){2})/ig, function(match) { return decodeURIComponent(match.replace(/./g, '%')) });

Submitted by anonymous - 9 years ago