Problems using regular expression with capturing and non-capturing groups

1 posts, 0 answers
  1. Pilar
    Pilar avatar
    1 posts
    Member since:
    Feb 2016

    Posted 19 Feb Link to this post

    I was having problems to replace some strings in the response. To look for the pattern I have using a regular expression, but I only want to replace one part of the expression. I was trying to define capturing groups with () and non- capturing groups with (?:). I have tested in some webs about regular expression and it works, but in fiddler doesn´t.

    For example. I have this code:  

    var oRegEX=/(?:(value="))(NOIA)/gi;
     oBody = oBody.replace(oRegEX, "xxxxxx");

    I look for expressions like value="NOIA" but I only want to replace the word NOIA like this value="xxxxxx"

    It has to be replaced the string NOIA but it replaces all value the string .

    Could you help me??
Back to Top