J
Julie
I have to process parameter input strings of key/value pairs /key=value where
value _may_ contain a slash /.
Here is a sample input string:
/def=gamma chain (FT2) /name=NULL /p_id=CF11423:SF7 /fn=Defense/receptor member
/process=Signal transduction /len=98
Here is the regex:
\s*(?<val>.*?)\s*=
Here is the output:
0: ""
1: "def"
2: "gamma chain (FT2) "
3: "name"
4: "NULL "
5: "p_id"
6: "CF11423:SF7 "
7: "fn"
8: "Defense"
9: "receptor member /process"
10: "Signal transduction "
11: "len"
12: "98"
Everything is fine *except* for the /fn value, I don't want it to split between
defense and receptor. Is this possible w/ a regex, or should I just code my
own split routine to handle this case?
value _may_ contain a slash /.
Here is a sample input string:
/def=gamma chain (FT2) /name=NULL /p_id=CF11423:SF7 /fn=Defense/receptor member
/process=Signal transduction /len=98
Here is the regex:
\s*(?<val>.*?)\s*=
Here is the output:
0: ""
1: "def"
2: "gamma chain (FT2) "
3: "name"
4: "NULL "
5: "p_id"
6: "CF11423:SF7 "
7: "fn"
8: "Defense"
9: "receptor member /process"
10: "Signal transduction "
11: "len"
12: "98"
Everything is fine *except* for the /fn value, I don't want it to split between
defense and receptor. Is this possible w/ a regex, or should I just code my
own split routine to handle this case?