-
Apr 10th, 2012, 11:46 AM
#1
Thread Starter
Junior Member
Using regex to identify this string???
Hello!
I'm trying to figure out how to use regex to grab the information between the double quotation marks, it will always be in this format:
Code:
Client: ("COMMAND", "DATA(if it exists)", "ARG1(if it exists)", "ARG2(if it exists)", "ARG3(if it exists)")
It will ALWAYS have the "COMMAND" string there no matter what, and when the "DATA" string is there, it can contain any character including:
Code:
"';,.<>/?!@#$%^&*()-=_+[]{}\|~`()
Which I see as becoming another problem itself because what if it contains more opening and closing brackets, and double quotations? How will I identify the information in-between the double quotation mark and grab only that data using regex even if it contains the same thing with-in itself?
For example:
Code:
Client: ("CHAT", "Randombot331", "Hello ("World!")))()()))")
Last edited by Lexsym; Apr 10th, 2012 at 11:55 AM.
-
Apr 10th, 2012, 02:01 PM
#2
Hyperactive Member
Re: Using regex to identify this string???
do you have to use REGEX? Why not string.substring function to parse out the individual values?
if i was able to help, rate my post!
-
Apr 10th, 2012, 05:18 PM
#3
Thread Starter
Junior Member
Re: Using regex to identify this string???
Well I was told once upon a time that regex is the best way.
However even using string.substring, it wouldn't work properly because of the character range that is allowed. Unless you can figure out a way to do it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|