Código:
nota: el script es Beanshellprint(GetNumberFromStr("saved2")); GetNumberFromStr(string str) { str = str.Trim(); Match m = new Regex(@"^[\+\-]?\d*\.?[Ee]?[\+\-]?\d*$", RegexOptions.Compiled).Match(str); return (m.Value); }
El error en sí es:
Cita:
Y me han sugerido que use:Sourced file: inline evaluation of: ``return new ToolScript() {void execute(LayoutWindow window) { import java.util.re . . . '' Token Parsing Error: Lexical error at line 9, column 28. Encountered: "\"" (34), after : "@": <at unknown location>
java.util.regex.Pattern