Regular Expressions

Teej's icon

hey all,

You lot have been amazingly helpful and patient with all my noobish questions, but fraid i have one more. Im looking to use regular expressions to extract specific words from text within a message box.

Example:

extracting the word dog, from the sentence: [the dog is fat and lazy]

any guidance on this would be greatly appreciated

many thanks

Tom

jvkr's icon

Thatsa simple: regexp

Teej's icon

sorry jvkrm, dont really understand your answer.

jvkr's icon

There is a regexp object that does regular expressions.

laonikoss's icon

create a new object called [regexp].

then alt+click that object and read the help page.

andrea agostini's icon

Hi Teej,

I'm afraid I don't understand what you mean by "extracting"... do you want to remove the word, in order to obtain "the is fat and lazy"? Or to know whether your message contains the word "dog"? In both cases, zl (filter / sub) is going to be much easier than regexp. But maybe I didn't get your question...

cheers
aa