Engineering Requirements Management

Engineering Requirements Management

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Remove Double Quotes from a string

    Posted 11/04/20 07:35 AM

    I am very new to dxl scripting, I want to know how to replace all the double quotes present in a string with nothing.





    #DOORS
    #SupportMigration
    #EngineeringRequirementsManagement
    #Support
    #Sustainability


  • 2.  RE: Remove Double Quotes from a string

    Posted 11/09/20 05:33 PM

    You probably already noticed there is no string "replace" function in DXL. So I think most people have written their own functions that do this ...at least that is what we have done.

    For your immediate issue something like this should work:

    Regexp lMatch = regexp2 "\"\"" string lText = "\"\"hel\"\"lo\"\"Goo\"\"dbye\"\"" while(lMatch lText){ lText = replaceRichText(lText, start(0), 2, "") } print lText

    But if you are going to be writing scripts in the future, you are probably better off creating your own function that you can reuse. You can probably search the forum and find working examples.





    #SupportMigration
    #Sustainability
    #EngineeringRequirementsManagement
    #Support
    #DOORS