regexp uppercase to lowercase

Posted by luccio on Stack Overflow See other posts from Stack Overflow or by luccio
Published on 2010-03-27T14:08:01Z Indexed on 2010/03/27 14:13 UTC
Read the original article Hit count: 464

Filed under:
|
|
|

Hi, is it possible to transform regexp pattern match to lowercase?

var pattern:RegExp;
var str:String = "HI guys";
pattern = /([A-Z]+)/g;
str = str.replace(pattern, thisShouldBeLowerCase);

Output should look like this: "hi guys"

Thx

© Stack Overflow or respective owner

Related posts about flex

Related posts about regex