Verifying that `{@Number}` correctly ignores digits that are part of other tokens (like strings or identifiers).
ID: 910
See: {@Number}
using uCalcSoftware;
var uc = new uCalc();
var t = new uCalc.Transformer();
t.FromTo("{@Number}", "FOUND");
// The '2' in 'var2' and the '100' in the string should NOT match
Console.WriteLine(t.Transform("""
var2 = "count is 100" + 50
"""));
var2 = "count is 100" + FOUND using uCalcSoftware; var uc = new uCalc(); var t = new uCalc.Transformer(); t.FromTo("{@Number}", "FOUND"); // The '2' in 'var2' and the '100' in the string should NOT match Console.WriteLine(t.Transform(""" var2 = "count is 100" + 50 """));
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
uCalc::Transformer t;
t.FromTo("{@Number}", "FOUND");
// The '2' in 'var2' and the '100' in the string should NOT match
cout << t.Transform(R"(var2 = "count is 100" + 50)") << endl;
}
var2 = "count is 100" + FOUND #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; uCalc::Transformer t; t.FromTo("{@Number}", "FOUND"); // The '2' in 'var2' and the '100' in the string should NOT match cout << t.Transform(R"(var2 = "count is 100" + 50)") << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Dim t As New uCalc.Transformer()
t.FromTo("{@Number}", "FOUND")
'// The '2' in 'var2' and the '100' in the string should NOT match
Console.WriteLine(t.Transform("var2 = ""count is 100"" + 50"))
End Sub
End Module
var2 = "count is 100" + FOUND Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t As New uCalc.Transformer() t.FromTo("{@Number}", "FOUND") '// The '2' in 'var2' and the '100' in the string should NOT match Console.WriteLine(t.Transform("var2 = ""count is 100"" + 50")) End Sub End Module