I've got data in the format:
How do I write the RegEx, so I have:
str = 'AA BBBB';
var pattern:RegEx = /(^.*)\b(.*)/;
newStr= pattern + pattern; // if both sides were found
Something like that.
var str:String = "Smith, JH";
var pattern:RegExp = /(\w+), (\w+)/;
var replacedStr:String = str.replace(pattern, "$2 $1"); // will be JH Smith in result
Hope it's helpful
Thank you meshgraphics and _Natahsa_ for your help. Much appreciated.