- Home /
Question by
meekinscot · Apr 12, 2016 at 04:26 PM ·
javascriptregexregularexpressions
Using Regex.Replace in Unityscript to remove punctuation
I am attempting to replace a series of punctuation characters within a string with a space instead. After googling and using these forums people seem to recommend regex.replace but this always gives me the 'expected a semi-colon' error. I have also read that regex is not supported in Unityscript but get conflicting information on this.
import System.Text.RegularExpressions;
function CheckText() {
var punctuationRegex : Regex("< |> |&");
myString = punctuationRegex.Replace(myString, " ");
}
Comment
Your answer
Follow this Question
Related Questions
Regular Expressions in Unity 0 Answers
Bypassing special characters 0 Answers
Setting Scroll View Width GUILayout 1 Answer
regular expressions 1 Answer
Can someone help me fix my Javascript for Flickering Light? 6 Answers