Hello,
I am working on a regular expression within Classification Rule Builder which would look for the value directly after the a colon (:) but would need to stop when it hits a pipe (|). I am running into difficulties getting Rule Builder to see the pipe in the string as the break point.
example:
s1:bird|s2:monkey|rsc:animal > dog > puppy|s3:cat|
It seems that sometimes [\\|] works but not all of the time. ex. (s2)\:(.+)[\\|](.+|$)
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Jessica,
I just saw this question. Not sure, if you are still interested in the answer.
You can create the regex in the following manner
s2:([^|]*)
So the "s2:" identifies the marker after which the value needs to be captured.
The "[^|]" is a condition to look for any character except the pipe symbol.So it breaks if it finds one. and returns all the characters before it.
Views
Replies
Total Likes
Hi Jessica,
I just saw this question. Not sure, if you are still interested in the answer.
You can create the regex in the following manner
s2:([^|]*)
So the "s2:" identifies the marker after which the value needs to be captured.
The "[^|]" is a condition to look for any character except the pipe symbol.So it breaks if it finds one. and returns all the characters before it.
Views
Replies
Total Likes