Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: djnrempelI am processing text that contains some dates written e.g. 12MAY16 and I want to use regexSubstitute to convert those to e.g. 12MAY2016.
DocNotes = DocNotes.regexSubstitute("(\\d{2})([A-Z]{3})(\\d{2})\\b","$1$2 20$3") is the closest I've come, but that adds a space e.g. 12MAY 2016.
Then I tried DocNotes.regexSubstitute("(\\d{2})([A-Z]{3})(\\d{2})\\b","$1$2[2]0$3").replace("[2]","2")
That seems to do the trick but it feels a bit kludgey. There must be a way to escape from the regex group identifier though, e.g. $1$2\20$3?
Is there a general reference on how regex works in Brainscript?