walterf25 Expert Licensed User Longtime User Jul 13, 2014 #1 Hello all, i was wondering if anyone had any suggestions on an issue i'm having, i need to split a response from a server at this character "|". The response from the server looks like this 1405231742050|http://www.someURL.com Click to expand... I've tried this code: Code: Copy Dim response() as string response = RegEx.Split("|", Job.GetString) the expected split string should be the following... response(0) should be timestamp (epochtime) and response(1) should be the URL Click to expand... but i'm not getting that response, i'm assuming that's because the PIPE character "|" is a reserved charcter in the Regular Expressions. Is there a way to go around this problem, does anyone have any suggestion, it is really late here, so i might just be chasing my own tale, any suggestions will be greatly appreciated. Thanks, Walter
Hello all, i was wondering if anyone had any suggestions on an issue i'm having, i need to split a response from a server at this character "|". The response from the server looks like this 1405231742050|http://www.someURL.com Click to expand... I've tried this code: Code: Copy Dim response() as string response = RegEx.Split("|", Job.GetString) the expected split string should be the following... response(0) should be timestamp (epochtime) and response(1) should be the URL Click to expand... but i'm not getting that response, i'm assuming that's because the PIPE character "|" is a reserved charcter in the Regular Expressions. Is there a way to go around this problem, does anyone have any suggestion, it is really late here, so i might just be chasing my own tale, any suggestions will be greatly appreciated. Thanks, Walter
Erel B4X founder Staff member Licensed User Longtime User Jul 13, 2014 #2 Code: Copy response = RegEx.Split("\|", Job.GetString) Upvote 0
C CidTek Active Member Licensed User Longtime User Jul 13, 2014 #3 Erel said: Code: Copy response = RegEx.Split("\|", Job.GetString) Click to expand... Just to add to Erel's answer the slash is what is known as an escape character in case you are curious as to how it works. Upvote 0
Erel said: Code: Copy response = RegEx.Split("\|", Job.GetString) Click to expand... Just to add to Erel's answer the slash is what is known as an escape character in case you are curious as to how it works.
walterf25 Expert Licensed User Longtime User Jul 13, 2014 #4 Erel said: Code: Copy response = RegEx.Split("\|", Job.GetString) Click to expand... Thanks Erel. Upvote 0
walterf25 Expert Licensed User Longtime User Jul 13, 2014 #5 CidTek said: Just to add to Erel's answer the slash is what is known as an escape character in case you are curious as to how it works. Click to expand... Thanks for that info CidTek, i did not know that. Walter Upvote 0
CidTek said: Just to add to Erel's answer the slash is what is known as an escape character in case you are curious as to how it works. Click to expand... Thanks for that info CidTek, i did not know that. Walter