ok, I switched back to using the short-hand syntax and got the regex working for latin chars:
sub in the hebrew range:Code:var rtl_match: RegExp = /[\u0041-\u007A]/g
and the damn thing stops working!Code:var rtl_match: RegExp = /[\u0590–\u05FF]/g;
you can see for yourself if you copy and paste this into a new fla:
switch between regex's by disabling/enabling lines 1/2Code://var rtl_match: RegExp = /[\u0041-\u007A]/g; var rtl_match: RegExp = /[\u0590–\u05FF]/g; var heb: String = 'השידור לא זמין. אנא נסה שוב או בחר בשידור אחר.'; var lat: String = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJLKMNOPQRSTUVWXYZ1234567890'; trace(heb.replace(rtl_match, '!')); trace(lat.replace(rtl_match, '!'))
interestingly using the hebrew match on 'lat' matches characters: uF059 the characters used in the regex suggesting it is no longer treating it as unicode syntax





Reply With Quote