RegExp to get any number + `;#`?
I have several numbers in a string, such as:
8;#
10;#
34;#
etc...
I wanted to erase all of these from the string, so was thinking RegExp would be my best option.
What regexp expres开发者_运维技巧sion do I use that will identify any series of numbers followed by ;#
?
Try something like this this:
\d+;#
I don't know AS3 but I think your code should look something like this:
var r:RegExp = /\d+;#/;
var s:String = "foo 8;# bar 10;#baz 34;# bah";
var x:String = s.replace(r, "")
精彩评论