[SOLVED]find regular expression not working lazarus / 9-Editor ---------------------------------------------------------------------- hy · 2014-10-07 16:14 Hi, maybe i am completely wrong but when searching for: Code: [Select]if p*<> NIL thenwith regular expressions checked, it deosn't find anything but there are hundreds of occurences. What am I doing wrong? thanks in advance ---------------------------------------------------------------------- Mike.Cornflake · 2014-10-07 16:26 Seems to be related to the spaces.  Works for me if I search for only p*<> As for why spaces don't work?  Sorry - not a regex guy, and I've never used this functionality before... ---------------------------------------------------------------------- hy · 2014-10-07 17:25 Thanks it's not the whitespace but you brought me into the correct answer. I needed to prepend the *(asterisk) with a . (dot) ---------------------------------------------------------------------- Leledumbo · 2014-10-07 23:41 Regular expressions has meta characters, which have special meaning inside the expression. To use them as normal character, they have to be escaped by '\'. So, '*' must be written as '\*'. Prepending with a dot has different meaning that your intention. * is a 0 or more quantifier, so p.* means: "p followed by any character, zero or more times". While p\* means : "p followed by asterisk character". ---------------------------------------------------------------------- hy · 2014-10-08 09:59 Thanks Leledumbo, I am aware of the meaning of regular expressions. I just omitted the dot "." before the asterisk. Stupid me...