Replace all upper case chars to lower case chars with RegEx

A swapping-ground for Regular Expression syntax

Replace all upper case chars to lower case chars with RegEx

Postby Admin » Wed Sep 09, 2020 1:10 am

Replace all upper case chars to lower case chars with a RegEx
It requires BRU version 3.4.0.0 or newer. It can only be done with version 2 regular expressions - tick v2 option in RegEx (1).

Match
(\w)/g
Replace
\L\1

The \w metacharacter is used to find a word character.
/g is the modifier used to perform a global match (find all matches rather than stopping after the first match). Tip: To perform a global, case-insensitive search, use this modifier together with the "i" modifier, e.g. /gi. /g and /i are only supported in version 2 regular expressions (v2).
\L means lowercase
\1 is the matched character.
Admin
Site Admin
 
Posts: 2068
Joined: Tue Mar 08, 2005 8:39 pm

Return to Regular Expressions