G
Guest
Hello,
I'm having a bit of trouble creating my regular expression and need a guru's
help!
Here's what I have...I have a sequence of characters that need to be
validated against the database.
string: ACCCGUCAU[5Br]IAACCU
What I'm trying to do is load the available values from the database and
create my regex pattern from that. Right now I'm basically just using the "|"
operator which gets a lot of it but it still needs more. I'm also escaping
the "[" and "]" characters during generation.
pattern: A|C|G|U|U\[5Br\]|C\[5F\]|U\[5F\]|U\[5I\]|5-M-C|2'-N-C|I
My problem is I think I'm escaping things improperly or something because if
I use this whole pattern I'm able to locate all of my "A,C,G,U,I" characters.
However, if I trim off those characters from my regex and start at U\[5Br]...
I can then locate the U[5Br] in my string. This is why I think I've screwed
something up.
What I would really like for this to do is not show me what matches but what
doesn't match.
string: ACCCGUCAU[5Bxxx]IAACCU
pattern: A|C|G|U|U\[5Br\]|C\[5F\]|U\[5F\]|U\[5I\]|5-M-C|2'-N-C|I
From this I'd hope to see "U[5Bxxx]" since it's not in the database.
Any ideas?
Thanks in advance.
I'm having a bit of trouble creating my regular expression and need a guru's
help!
Here's what I have...I have a sequence of characters that need to be
validated against the database.
string: ACCCGUCAU[5Br]IAACCU
What I'm trying to do is load the available values from the database and
create my regex pattern from that. Right now I'm basically just using the "|"
operator which gets a lot of it but it still needs more. I'm also escaping
the "[" and "]" characters during generation.
pattern: A|C|G|U|U\[5Br\]|C\[5F\]|U\[5F\]|U\[5I\]|5-M-C|2'-N-C|I
My problem is I think I'm escaping things improperly or something because if
I use this whole pattern I'm able to locate all of my "A,C,G,U,I" characters.
However, if I trim off those characters from my regex and start at U\[5Br]...
I can then locate the U[5Br] in my string. This is why I think I've screwed
something up.
What I would really like for this to do is not show me what matches but what
doesn't match.
string: ACCCGUCAU[5Bxxx]IAACCU
pattern: A|C|G|U|U\[5Br\]|C\[5F\]|U\[5F\]|U\[5I\]|5-M-C|2'-N-C|I
From this I'd hope to see "U[5Bxxx]" since it's not in the database.
Any ideas?
Thanks in advance.