![]() (CAP1/10), "Price cannot be zero") - Calculates Price per Unit if not Zero.Īs the engine is LUA driven all LUA math and string functions can be used in set or either cond Replace with: cond(CAP1~=0, "Price per unit: ". Replace with: set(CAP1 * 1.2) - multiplies decimal number with 1.2 Note: $1 and $2 can be used in ReplaceString but content will only be resolved in CAP Variables for conditions and math functions CAP variables are usable for calculations or as strings.įormat Handling: If the CAP variable is a number it can interpret both dot and comma as decimal separators, making international usage more straightforward. ![]() MATCH: Contains the text of the detected string.ĬAP1, CAP2, …: Correspond to regex capture groups $1, $2. LCNT: Count of the detected string within the line.ĬOL: Column number where the string was found (CSV-Scope option selected). LINE: Line number where the string is found.ĪPOS: Absolute character position in the document. (will be enhanced in future by User requests): Set(LINE+5) - results in “10” (assuming LINE = 5).Ĭond(LINE=9, "edge", "center") - results in “edge” (assuming LINE = 5). Set("replaceString".CNT) - results in “replaceString3” (assuming CNT = 3). Set(strOrCalc) - simple push of math results to ReplaceĬond(condition, trueVal, ) - if-then or if-then-else condition for push of results It can work with all search settings combined and is not exclusively dependent on regex.Įither set or cond command is mandatory to set in ‘Replace with’ to wrap the math functions. This option facilitates math functions and dynamic string substitutions within a Replace String. For older versions of Notepad++, you may be able to install it manually.Īs explained in this post, this is in a nutshell how MultiReplace is working for Math. Starting in Notepad++ v8.5.8, you can install the plugin through Plugins Admin. The MultiReplace Plugin is another plugin that will allow replacements to use mathematical forumula.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |