Is there something wrong with my regex syntax or the way i set up my yahoo pipe?

100 Views Asked by At

Sorry guys, I can't post images yet, so if it's not too much trouble, see this: yahoo pipe screenshot

What I'm trying to do is grab the address in parentheses, and nothing else. It is my understanding that replacing it with $1 should replace the entire "item.description" with the address in parentheses.

This regex (\(.+\)) should work, but for some reason the feed isn't altered.

I've tried to figure out why through yahoo pipes help pages, and based on the Regex example they gave, it seems this should have worked.

What am I failing to understand here? If you can't tell, I'm kind of a newbie, so be kind...

1

There are 1 best solutions below

1
On BEST ANSWER

The regex (\(.+\)) matches only the parentheses and their contents, so that's all that gets replaced--and you're replacing it with itself. You need something like ^.*(\(.+\)).*$ if you want to keep the parens, or ^.*\((.+)\).*$ if not.

This assumes there's only one set of parens. You may need to specify the s modifier too, if there can be line breaks in the text.