Skip to main content
Chris72Caldwell
Participant
May 11, 2016
Question

removing unwanted characters from supplied data

  • May 11, 2016
  • 1 reply
  • 240 views

I have a calculation to perform with 2 pieces of client supplied data. Sometimes this data is provided as <0.1 rather than specifying 0.085 for instance.

I have tried using variable.replace(/>/g,"") to remove the '>' character to be able to use just 0.1 as the data for calculation, but to no avail.

Can someone help?

eg.

var custData1 = "<0.1";

var custData2 = "50";

var sData = custData1.replace(/>/g,"");

var cCalc = (sData/custData2)*100;

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
May 11, 2016

Why are you removing ">" instead of "<"?

On Thu, May 12, 2016 at 12:01 AM, Chris72Caldwell <forums_noreply@adobe.com>