18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

regular expression

alamoonalamoon Members
edited November -1 in Sahi - Open Source
please an answer, it's very important:
i want to delete " and , from a text ex:
"h","t","t","p"
using
var $lines1 = $fileContent.replace(/\r\,/g, "").split("\n");
can anywone help?

Comments

  • narayannarayan Administrators
    To replace only " and , use /[",]/g

    '"h","t","t","p"'.replace(/[",]/g, "") will give you 'http'

    To test and experiment you can paste '"h","t","t","p"'.replace(/[",]/g, "") into the Controller "Evaluate expression" box and click Test --> button.

    Regards,
    Narayan
  • thank you for yor help, it works now.
This discussion has been closed.