ALM
ALM

Reputation: 3

Replace item.title in yahoo pipes with regex

In Yahoo Pipes, titles of feed'items :

I want to replace them by

I use regex

replace item.title ^.+(\d{1,2}.+\d{4}) with $1

But i obtain

I have no idea to solve my problem. If someone could help me. Thanks a lot

Upvotes: 0

Views: 437

Answers (2)

burning_LEGION
burning_LEGION

Reputation: 13450

try to simplify your regex, for example \d{1,2}.+\d{4}

Upvotes: 0

Lone Shepherd
Lone Shepherd

Reputation: 1005

It looks like your first .+ is grabbing the first digit, because your capturing rule, \d{1,2} says grab 1 or two digits, and .+ can grab anything. Be more specific and put a \s+ before matching the digits.

Why not try:

.+\s+(\d{1,2}\s+\S+\s+\d{4})

Upvotes: 1

Related Questions