The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove text/find/replace ect
#1
I was looking at help files but couldnt find code that would do the action i need. Here is the problem:
I have this text in the cliboard "10,977.21 RSD [ <color=0xff00ff00>-39.72% below Regional average ]"
and i need to extract just the price in front so it is just 10977.21. now i tried various methods with
find/replace but the second part keep changing and i cant just copy it and use it every time.
Is there a way to first remove everything on the right of RSD? That would leave me with just RSD and "," to replace every time.

-maby to first try to find the "RSD" position and than use
Code:
Copy      Help
s.replace(ss [from] [nc])
.. Just
brainstorming here dow i dont have a clue how to find RSD position eather :oops:

-Trying to find RSD position with
Code:
Copy      Help
_s.getclip
lpstr delimiters = " .:\/''[]"
int findw(_s RSD 0 delimeters)

But i keep getting an error: Error in Macro21: this name already exists. Give different name. (and highlight's findw)

-But even if i find the position how to i inplement it in
Code:
Copy      Help
s.replace(ss [from] [nc])
because it's asking for a number to be put in, but i need to use variable because the position will change..


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)