Closed
Bug 684142
Opened 14 years ago
Closed 7 years ago
Actionscript regexp resolve \\u error
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
RESOLVED
WONTFIX
Future
People
(Reporter: qasdfgtyuiop, Unassigned)
References
Details
Attachments
(1 file)
|
328 bytes,
text/plain
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0a2) Gecko/20110901 Firefox/8.0a2
Build ID: 20110901042012
Steps to reproduce:
(Sorry for my English)
I'm trying to match a string containing "\u" with regexp,the code is simple:
package
{
import flash.display.Sprite;
import flash.text.TextField;
public class test extends Sprite
{
public function test()
{
var tf:TextField = new TextField();
addChild(tf);
var str:String = "\\u000000";
var reg:RegExp = /\\u.*/g;
tf.text = str.match(reg).length.toString();
}
}
}
Actual results:
It seems that nothing matched. When debugging this program, I found that reg.source is "\\u.*" which should be "\\\\u.*".
If I replace "var reg:RegExp = /\\u.*/g;" with "var reg:RegExp = new RegExp("\\\\u.*"","g");", it works well
Expected results:
I expected to see 1 on screen, but I saw 0
Flags: flashplayer-qrb+
Flags: flashplayer-needsversioning+
Target Milestone: --- → Future
Blocks: regex-upgrade
Comment 1•7 years ago
|
||
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•