Hello,
Regex is missing in OpenFl ?
var myPattern:RegExp = new RegExp("sh", "g");
var str:String = "She sells seashells by the seashore.";
trace(str.replace(myPattern, "sch")); // She sells seaschells by the seaschore
Thanks
Hello,
Regex is missing in OpenFl ?
var myPattern:RegExp = new RegExp("sh", "g");
var str:String = "She sells seashells by the seashore.";
trace(str.replace(myPattern, "sch")); // She sells seaschells by the seaschore
Thanks
It’s part of Haxe.
You can try here : https://try.haxe.org/#91d1f
var myPattern = ~/sh/g;
var str:String = "She sells seashells by the seashore.";
trace(myPattern.replace(str, "sch")); // She sells seaschells by the seaschore
Thanks
var myPattern:EReg = new EReg("sh", "g");
var str:String = "She sells seashells by the seashore.";
trace(myPattern.replace(str, "sch")); // She sells seaschells by the seaschore