Help with a regex expression RSS Back to forum
@Kwan Lau: Both { and } are special characters in regular expressions and need to be "escaped" with \ to make them treated as regular characters. For instance, "product {sale}" should be written as "product \{sale\}". Curly braces (as special characters) are used to represent repetition in regexs - the expression "a{5}" means exactly five "a" characters, "a{5,}" means minimum five "a" characters and "a{5,10}" means 5 to 10 "a" characters. Without escaping I think you regex may have been syntactically wrong.
Hmmm, then I think I'm doing something wrong and wouldn't mind some help. What I'm trying to do is to pick up any instances of the character { or } within a string. I've tried \({|}) and even broken them up \{ and \}. The first won't pick it up, and the latter will only pick up the characters if its at the beginning of the sample and not if its within.
Try
.*(\{|\}).*
This means any characters, any number of repetitions, followed by either { or }, followed by any character, any number of repetitions.
I was wondering if there was a way for my Keyword Filter to pick up the character { or }? I've been trying different combinations and testing but don't seem to have it down.