I must be coding my Regex:Split incorrectly. It appears to be failing on the Regex line. Code is listed below, followed by output from Log. I am getting my Log entry (hightlighted in Blue) showing the input value, but it never gets past the Regex line.
Would appreciate any help you all can give . Thank You.
Bob
Would appreciate any help you all can give . Thank You.
Bob
B4X:
Sub Activity_Create(FirstTime As Boolean)
[INDENTDim InputData() As String][/INDENT]
Dim RawData As String
RawData = "Ficticious Name++Dummy Department++++++"
Log ("RawData: " & RawData)
InputData = Regex.Split("+", RawData)
Log ("InputData(1): " & InputData(1))
Log ("InputData(2): " & InputData(2))
End Sub
B4X:
** Activity (main) Create, isFirst = true **
[COLOR="Blue"]RawData: Ficticious Name++Dummy Department++++++[/COLOR]
main_activity_create (java line: 251)
java.util.regex.PatternSyntaxException: Syntax error U_REGEX_RULE_SYNTAX near index 1:
+
^
at com.ibm.icu4jni.regex.NativeRegEx.open(Native Method)
at java.util.regex.Pattern.compileImpl(Pattern.java:383)
at java.util.regex.Pattern.<init>(Pattern.java:341)
at java.util.regex.Pattern.compile(Pattern.java:317)
at anywheresoftware.b4a.keywords.Regex.getPattern(Regex.java:34)
at anywheresoftware.b4a.keywords.Regex.Split2(Regex.java:75)
at anywheresoftware.b4a.keywords.Regex.Split(Regex.java:69)
at PCAW.Residents.main._activity_create(main.java:251)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:104)
at PCAW.Residents.main.afterFirstLayout(main.java:84)
at PCAW.Residents.main.access$100(main.java:16)
at PCAW.Residents.main$WaitForLayout.run(main.java:72)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
java.util.regex.PatternSyntaxException: Syntax error U_REGEX_RULE_SYNTAX near index 1:
+
^