String.replace(/re/, replFN) does not count the index position properly for unicode characters

Hello!
In my project, I want to find emoticons in text and append them to a text flow as images. I use regular expression and with English alphabet, all works fine, but when I enter text in other languages, every letter gets counted twice:
var re:RegExp = /:\)/g;
var textEng:String = "Hello, :)";
var textRu:String = "Привет :)";
textEng.replace(re, replFN); // index is 7
textRu.replace(re, replFN); // index is 13
function replFN():String{
  var a:Array = arguments;
  trace(arguments[1]); //The index position in the string where the match begins.
  return arguments[0];
Obviously it's a bug, and the workaround is to use textRu.indexOf(arguments[0]), and keep some lastIndex:int variable when iterating over many matches of the string. But do I need to report it on Jira?
privatevar lastIndex:int = 0;
private function replFN():String{
  var a:Array = arguments;
  var textToAdd:String = textRu.slice(lastIndex,textRu.indexOf(arguments[0]));
  trace(textToAdd);
  lastIndex = textRu.indexOf(arguments[0]) + arguments[0].length;
  trace(arguments[0]);
  return arguments[0];
Thanks.

Dear @kglad
Could you now please match this regex:
var re:RegExp = new RegExp("(http|ftp|https):\/\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?^=%&:\/~\\+#]*[\\w\\-\\@?^=%&\/~\\+#])?", "g");
in this string:
"Hello! Photos can be found here: http://flicks.yahoo.com/photo and search is available here: http://yahoo.com/seach.jsp?ref=email&query=welcome%20back"
using your method.
Looking forward to a reply from certified expert.
Best regards.

Similar Messages

  • SOLVED - BIOS UPDATE "SYSTEM DOES NOT CONTAIN the NECESSARY WMI SUPPORT for this VERSION of HPQflash

    If you get infamous error when updating HP Portables (laptops/notebooks/ netbooks) BIOS within Windows:
    "SYSTEM DOES NOT CONTAIN THE NECESSARY WMI SUPPORT FOR THIS VERSION OF HPQFLASH":
    I am posting a solution found for own business laptop (HP 8540W & 8760W) so WebSearch engines index/register it in a few days - future sufferers come here and get a SOLUTION, finally.  Disreagrd previous "experts" advises, they don't work 100% & pity on TechSupport folks who get HP paychecks yet don't know products their co. designs/manufactures (on deep Technical level):
    Below is a SOLUTION (WORKING) !
    Go into Services (Run "services.msc" or get there thru ControlPanel-->AdminTools-->), find following 2 services ==> make sure they're running, chances are they're NOT (as in my case I keep them disabled unless need running):
    1) "HP Software Framework"
    2) "HP Service" [no typo - a real plain name]
    If not running, set Properties-->Manual and click "Start", make sure both are running.
    Rerun BIOS updater, choose option for "Within Windows" or something to that effect (using HPQ/ROMpaq updater), rather than "create USB BootDisk on Key", this time it should work without the hassle of a BootDisk creation.
    Should work from within Windows environment.
    Notes:
    a) Likely only one (1) service is responsible - namely "HP Software Framework" for HPQ Updater to fail, but doesn't hurt to reenable/restart both services.
    I in fact am responding to other customers who elect to Update BIOS within Windows, perhaps oldfashioned but to me Boot Updater is more natural & always works regardless of WMI Support.
    b) After done, don't forget:
    *) Recheck BIOS settings - update may've added new and/or changed old, so rescan tobe sure.
    **) Go BACK into Windows-->Services.msc & redisable both aforementioned Services if were originally disabled; or you're a computer Pro, you know what you're doing & like me keep all HP services disabled.  The ones we got on EliteBook 8760W are pests consuming system resources, you just enable "Software Framework" when occasional issues emerge with HP softupdate (typically no issues) & redisable after use, rest of services are bloatware - some attempt to overrun Windows Wireless console, some seekout HP Networked printers (Ethernet, Wireless, but not USB), some do this & that - I study/know which one does what and decided to disable all. This is called a "minimalist" philosophy & turns your machine into a fast beast, I recently sold a very obsolete 4-year laptop which however handles 3DMCAD & complex designs/simulations, better new machines out fo a store, as new machines are loaded w/bloatware chocking down resources.
    BUT nobody is requiring you to disable anything though.
    The solution merely states the fact:
    These 2 (or 1) services when not running halt BIOS Update "within Windows" (you can still run "BootDisk option", however, if preferred).
    Simply restartung them solves your problem.  Usually
    Ya'll have a good day and enjoy!
    ===========
    BELOW ARE IMPORTANT WARNINGS:
    1) IF YOUR BIOS UPDATE STILL FAILS, SOME OTHER PIECE IN WMI SUPPORT IS MISSING - IN MY CASE WAS THESE 2 SERVICES, BUT THERE'S REMOTE POSSIBILITY SOMETHING ELSE MIGHT BLOCK UPDATER.  DON'T WASTE TIME & CHOOSE "USB/BootDisk" options instead
    2) Once BIOS updater does its job, will ask to auto-restart - let it go on & complete, it will self-shutdown (click "Next" to skip 60-second timer), then do NOT turn it on manually!, wait - it'll turn on by itself in 15 seconds, let it boot into Windows, you're done!
    3) WARNING: close other apps before proceeding, be 100% sure your ACpower won't be interrupted or better yet - make sure battery is in/charged (so if ACpower accidentally disconnects, you're autoswitched onto battery) b/c power loss may result in severe damage to internal hardware.  In the old days it'd result in fatal damage, these days powerloss would still result in a major repair (ROM chip corruption).
    So to summarize: those 2 services I specified, are often responsible for whether HPQ/ROMpaq will or won't run.
    Other causes possible, but I've not witnessed; and if so - choose BootDisk option.
    ===
    Stan M. Starinski, MSEE.

    Hello Ceramics.
    Your ProBook is an Enterprise model.  It would be a good idea to also post your question to the HP Business Boards as those forums deal specifically with that kind of product.  Here is a link.
    Have a great day!
    Please click the white star under my name to give me Kudos as a way to say "Thanks!"
    Click the "Accept as Solution" button if I resolve your issue.

  • I'm trying to download the trial version of Adobe Illustrator. An error message says that the OS does not meet the minimum system requirements for the installer. 10.6.0 is the minimum required for installation. How do I get my mac to be a 10.6.0 ?

    I'm trying to download the trial version of Adobe Illustrator. An error message says that the OS does not meet the minimum system requirements for the installer. 10.6.0 is the minimum required for installation. How do I get my mac to be a 10.6.0 ? Right now I have a 10.5.8 is there a way to upgrade or something?

    Buy the Snow Leopard retail installer (http://store.apple.com/us/product/MC573Z/A?fnode=MTY1NDAzOA).
    That will take you to 10.6.3.
    If required you can then use the combo updater to get to the latest version, 10.6.8 (http://support.apple.com/kb/DL1399)
    SL system reqmts;

  • AADSTS50011: The reply address does not match the reply addresses configured for the application

    Can anyone tell me where to update the reply address?
    I have AD synced from on-prem to Azure, then I setup a website on azurewebsites.net, then created a CNAME record from portal.mydomain.com to portal.azurewebsites.net. When I try to login using portal.mydomain.com I get:
    AADSTS50011: The reply address does not match the reply addresses configured for the application.
    Can anyone help? Thanks
    Frank Russo

    Hi Frank69,
    Thanks for posting here!
    It appears to me that the application is unable to find the URL you have configured on Azure or could be missing from the list. As a result the application is attempting to authenticate against AAD but failing to match the URl it wants.
    I would suggest you to re-configure your AAD application on Azure and set one or more reply URLs.
    Reference link:
    http://www.matvelloso.com/2015/01/30/troubleshooting-common-azure-active-directory-errors/
    Regards,
    Sadiqh
    Disclaimer: This response contains a reference to a third party World Wide Web site.
    Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety,
    or suitability of any software or information found there.
    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

  • OS does not meet the minimum system requirements for this installer. 10.6.0 is the minimum required

    How do I get my software? This is the message I am hitting before my download will complete:
    OS does not meet the minimum system requirements for this installer.
    10.6.0 is the minimum required for installation.

    Hi,
    May I know what are you trying to download ?
    What is the MAC OS version you are using ?
    It seems you are trying to download an application which needs atleast 10.6 MAC version
    I think you are using lower version of MAC, let us know the version of your MAC , in order to help better .
    To check the version  : click on Apple Button on top left
    select about this MAC, you will get to know the version over there.
    If its something 10.5.x , then you need to upgrade your MAC in order to install that application which needs 10.6 MAC
    Thanks,
    Baljeet

  • HT202239 This computer does not meet the recommended system requirements for 3D titles.

    Hey guys.
    Today I downloaded FCP 10.2 and when enabling 3D text this message appeared "This computer does not meet the recommended system requirements for 3D titles". I ignored it and continued working on the 3D text, everything looked fine. Could someone tell me what the difference is when working on a not compatible computer?
    Thanks!
    www.lightbroscreative.com

    Tech specs for 10.2
    256MB of VRAM (1GB recommended for 4K editing and 3D titles)
    I guess you have the minimum to download, but VRAM isn't enough for 3D.

  • HTC Legend does not meet the minimum system requirements for firefox.

    I have download firefox(Android) for HTC Legend. It had shown that this device does not meet the minimum system requirements for firefox. I want to know that what is the problem in this device. Actualy, Firefox has already downloaded in this device.

    See https://wiki.mozilla.org/Mobile/Platforms/Android for system requirements, and an experimental version that might work on your phone.

  • Query on virtual column that is defined in XMLIndex does not use the index

    Hello,
    I am facing an issue in executing queries on a virtual column that is defined in an XMLIndex: it appears as if the index is not used.
    Database details:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    For this use case the XML documents adhere to the following XSD and are stored in an XMLType column in a table:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns="http://a_name_space/v1"
        targetNamespace="http://a_name_space/v1"
        elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
        <xsd:element name="fields">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="field" maxOccurs="unbounded">
                        <xsd:complexType>
                            <xsd:choice>
                                <xsd:element name="value" minOccurs="1" maxOccurs="1">
                                    <xsd:complexType>
                                        <xsd:simpleContent>
                                            <xsd:extension base="notEmptyString4000Type"/>
                                        </xsd:simpleContent>
                                    </xsd:complexType>
                                </xsd:element>
                                <xsd:element name="values" minOccurs="1" maxOccurs="1">
                                    <xsd:complexType>
                                        <xsd:sequence>
                                            <xsd:element name="value" minOccurs="1" maxOccurs="1">
                                                <xsd:complexType>
                                                    <xsd:simpleContent>
                                                        <xsd:extension base="notEmptyString4000Type">
                                                            <xsd:attribute name="startDate" type="xsd:date" use="required"/>
                                                            <xsd:attribute name="endDate" type="xsd:date" />
                                                        </xsd:extension>
                                                    </xsd:simpleContent>
                                                </xsd:complexType>
                                            </xsd:element>
                                        </xsd:sequence>
                                    </xsd:complexType>
                                </xsd:element>
                            </xsd:choice>
                            <xsd:attribute name="name" type="string30Type" use="required"/>
                            <xsd:attribute name="type" type="dataType" use="required"/>
                        </xsd:complexType>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        <xsd:simpleType name="dataType">
            <xsd:annotation>
                <xsd:documentation>Char, Date, Number</xsd:documentation>
            </xsd:annotation>
            <xsd:restriction base="xsd:string">
                <xsd:enumeration value="C"/>
                <xsd:enumeration value="D"/>
                <xsd:enumeration value="N"/>
            </xsd:restriction>
        </xsd:simpleType>
        <xsd:simpleType name="string30Type">
            <xsd:restriction base="xsd:string">
                <xsd:maxLength value="30"/>
            </xsd:restriction>
        </xsd:simpleType>
        <xsd:simpleType name="notEmptyString4000Type">
            <xsd:restriction base="xsd:string">
                <xsd:maxLength value="4000"/>
                <xsd:pattern value=".+"/>
            </xsd:restriction>
        </xsd:simpleType>
    </xsd:schema>A field can have a single value as well as multiple values.
    The XMLIndex is defined as follows:
    CREATE INDEX test_xmltype_idx ON test_xmltype (additional_fields) INDEXTYPE IS XDB.XMLIndex
    PARAMETERS
    XMLTable dt_fld_tab (TABLESPACE "TAB_SPACE" COMPRESS FOR OLTP) ''fields/field''
    COLUMNS
    name varchar2(30 char) PATH ''@name''
    ,dataType varchar2(1 char) PATH ''@type''
    ,val varchar2(4000 char) PATH ''value/text()''
    ,vals XMLType PATH ''values/value'' VIRTUAL
    XMLTable dt_fld_multi_value_tab (TABLESPACE "TAB_SPACE" COMPRESS FOR OLTP) ''value'' passing vals
    COLUMNS
    val varchar2(4000) PATH ''text()''
    ,startDate varchar2(30 char) PATH ''@startDate''
    ,endDate varchar2(30 char) PATH ''@endDate''
    ');The following b-tree indexes are defined:
    create index dt_field_name_idx on dt_fld_tab (name);
    create index dt_field_value_idx on dt_fld_tab (val);
    create index dt_field_values_idx on dt_fld_multi_value_tab (val);And stats are properly computed before the queries are executed:
    call dbms_stats.gather_table_stats(user, 'test_xmltype', estimate_percent => null);Queries for single values are cost efficient and fast. With 600K rows in the table these return with 0.002 seconds.
    Queries for multi-valued fields / elements are not though, these result in a full table scan.
    Sample XML snippet:
    <fields>
      <field name="multiVal" type="C">
        <values>
          <value startDate="2013-01-01" endDate="2013-01-01">100</value>
          <value startDate="2014-01-01">120</value>
        </values>
      </field>
    </fields>Examples of costly and slow queries:
    select id from test_xmltype
    where xmlexists('/fields/field/@name="multiVal"' passing additional_fields)
    and xmlexists('/fields/field/values/value[@startDate="2013-01-01"]' passing additional_fields)
    and xmlexists('/fields/field/values/value[text()="100"]' passing additional_fields)
    select id from test_xmltype
    where xmlexists('/fields/field/@name="multiVal"' passing additional_fields)
    and xmlexists('/fields/field/values/value[@startDate="2013-01-01" and .="100"]' passing additional_fields);Whereas the following query on the multi valued field is fast:
    select id from test_xmltype
    where xmlexists('/fields/field/@name="multiVal"' passing additional_fields)
    and xmlexists('/fields/field/values/value[@startDate="2013-01-01"]' passing additional_fields);For the XPath /fields/field/values/value[@startDate="2013-01-01"] the index is used.
    Suspected cause: XPath issue for the value of a multi valued field, e.g. /fields/field/values/value[text()="aValue"].
    Any hints are appreciated: what am I overlooking here?
    Thanks in advance,
    -Sjoerd
    Edited by: user615230 on May 27, 2013 7:46 AM

    Hello,
    This is using binary XML. The table creation script is:
    create table test_xmltype
    (id number(14,0) not null primary key
    ,member_code varchar2(30 char) not null
    ,period_code varchar2(30 char) not null
    ,amount number(12,2) not null
    ,additional_fields xmltype
    );The schema is not registered in the database. Is that required? It is primarily used to generate Java classes that will be used in order to construct the XML documents.
    And you are right: for our initial investigation the sample XML documents are generated with a PLSQL routine and do not contain namespaces. But for the single valued fields there are also no namespaces and the queries on these are executed with very satisfactory plans.
    Thanks for the swift reply.
    -Sjoerd

  • SCOM 2012 Installation does not show the SQL Server Instance for reporting services

    I have an issue when I try to install SCOM 2012 with the Reporting Server feature, so in the step that I have to select a SQL Server Instance I cannot do that, because as you can see in the picture no one option appears.
    In my scenario I have a DCSERVER, SQLSERVER2008 R2, SCCMSERVER 2012 and in other server I are trying to install SCOM 2012. I are trying to use the same SQLSERVER to SCOM 2012.
    Should I do other procedure on SQL Server before to continue? I will apreciate someone could say me what I need to do to resolve this issue.
    Regards,
    Paul Mendoza.

    Hi Paul
    Can you confirm that SQL Reporting Services is installed on the server that you are doing the install.
    For a lab environment where you have SCOM Management Server, Web Server on one server and SQL Server on another you need to:
    - run setup on the SCOM Server and choose NOT to install reporting. The install here will create the OperationsManager database and OperationsManagerDW (reporting) database.
    - run setup on the SQL Server where SQL Reporting Services is installed. Then choose to install reporting. You should then see the SQL Reporting Services instance on the above window which is blank in your screenshot.
    Take note of the warning in that window - SCOM uses its own role based security within SQL Reporting Services and this can break other reporting. E.g. you can't install SCOM and SCSM reporting (SQL RS component) together. 
    Cheers
    Graham
    New SCOM 2012 Blog! - http://www.systemcentersolutions.com/blog/
    View OpsMgr tips and tricks at
    http://systemcentersolutions.wordpress.com/

  • My iTunes does not update the album covers properly.

    I have the album covers in the same file location as the MP3 songs, and each album is located in a different file location, but iTunes does not load my album covers automatically. half the time I have to load the album cover from my library manually.
    I have authorised the computer, re-installed iTunes, manually selected all songs and updated album covers in the advace section. Nothing works.

    Try updating your iTunes using an iTunesSetup.exe (or iTunes64Setup.exe) installer file downloaded from the Apple website:
    http://www.apple.com/itunes/download/

  • My iPhone 3 does not have the x on apps for me to delete , so how can I delete my apps

    My iPhone 3 does not have a x at the corner of my apps when I press and hold, so how can I delete apps?

    Hey Sharifa04,
    It sounds like you may have Restrictions enabled, specifically the restriction of deleting applications. You can disable this behavior in Settings > General > Restrictions > "Deleting Apps" (Note: You'll need to enter your restrictions passcode to disable restrictions). For more information, see the following article:
    iOS: Understanding Restrictions (Parental Controls)
    http://support.apple.com/kb/HT4213
    Also, keep in mind that you will not be able to delete the pre-installed applications on the iPhone, as they are required by the software.
    Thanks,
    Matt M.

  • DE 1.5 and 1.6 does not store the last position correctly

    Hi!
    I've seen this problem in DE 1.5, now I tried to install 1.6 and I see the problem is still here.
    I have some DRM-protected ebooks on my laptop. I open one of them, read, close on some page (for example, 162). Then I open another ebook, close it. Then I open the first ebook again and the position is 163-th page, not 162. Close and open again, the position is 164. And so on.
    I expect DE should store the last position without any "auto next page" functionality. Could somebody say me what is wrong here? Or, perhaps, this a bug of DE...

    Alexey,
    Please open a Digital Editions 1.5 Technical Support case. Use the contact links at http://www.adobe.com/support/digitaleditions.
    Regards,
    Bentley Wolfe
    Senior Support Engineer, Flash/Flash Player/Digital Editions
    Adobe

  • E2500 replacing a WRT54G does not see the internet

    I am trying to replace a (dying) WRT54G with an e2500. I've done the usual several times:
    - remove the old router
    - connnect the new router to the DSL modem
    - power up the 2500
    - run linksys connect
    - power cycle the DSL modem
    The result is a network created based on the e2500 that provides wireless connections to the various devices in the house (computers, network drives, ...) but no connection to the internet.   When I reinsert the WRT54G and power it up, the network runs as before.
    I read on this forum something about a conflict between the IP address of the e2500 (192.168.0.1) and the DSL modem.  However the IP address for the e2500 is the same one used by the WRT54G.
    Any suggestions?
    Thanks,
    Bert

    Follow here to set up your DSL service.
    http://kb.linksys.com/Linksys/ukp.aspx?pid=80&login=1&app=search&vw=1&articleid=3687

  • MacPro2008 This system does not meet the minimum system requirements for graphics cards. FCP

    Running FCPX 10.0.8 not possible because the graphic card
    ATI Radeon HD 2600 doesn't support FCP.
    Which affordable and compatible graphic card does support FinalCutPro 10.0.8?

    Hello RenéG
    Check out the first article for a list of video cards compatible with your Mac Pro Early 2008 model. I have also provided a link to a video card that is currently being sold on the Apple Store website that is compatible as well.
    Mac Pro (all models): Graphics card compatibility between models
    http://support.apple.com/kb/ht2848
    NVIDIA Quadro 4000 for Mac
    http://store.apple.com/us/product/H3314LL/A/nvidia-quadro-4000-for-mac?fnode=53
    Regards,
    -Norm G.

  • CS5.5 Upgrade does not accept the serial number used for CS 5 Master Collection install

    Installed CS5 Master Collection from disk with given serial number.  CS5 Master Collection installed fine.  Inserted CS 5.5 Design Standard disk, and entered its serial number.  It asked for a qualifying product/serial number.  I selected "Master Collection CS5" and entered the serial number I had just used to successfully install that product.  I get an error saying "This serial number is not for a qualifying product.  Please try another."

    Serial Number or Activation Issues
    You need to contact Adobe Support either by chat or via phone when you have serial number and activation issues.
    Here are some links to help making contact:
    http://www.adobe.com/support/chat/ivrchat.html
    http://www.adobe.com/support/download-install/supportinfo/

Maybe you are looking for