1

I have a couple of strings that end with a dot (.) at the end of the sentence which I need to remove in Yahoo Pipes.

Example:

example.com.
companywebsite.co.uk.
anothersite.co.

I've tried the following from a couple of posts here on SO but none have worked yet

/\.$/

or

^(.*)\\.(.*)$","$1!$2

Neither of these options have worked

I have tried a very simple find of

 .com. and replace with .com

and

 .co. to replace with .co

But the latter affects .com as well which is not ideal

EDIT: Here is a visual of what my pipe looks like.

enter image description here

SixfootJames
  • 1,841
  • 5
  • 26
  • 42
  • Did you use `/\.$/` or simply `\.$` ? The latter should work. See this example: http://pipes.yahoo.com/pipes/pipe.info?_id=4380273f0827fcda6c6c1ee453fd454a – janos Jun 04 '14 at 12:07

1 Answers1

1

If you can do something like this: ^(.*)\\.(.*)$","$1!$2, then doing this should work: "^(.+?)\.?$", $1. This should match the first part of the URL and leave out the period at the end, should it exist.

EDIT:

As per your image, you should place this: ^(.+?)\.?$ in your replace field and this: $1 in your with field. I do not know if you need to do any escaping, so you might have to use ^(.+?)\\.?$ instead of ^(.+?)\.?$.

enter image description here

SixfootJames
  • 1,841
  • 5
  • 26
  • 42
npinti
  • 51,780
  • 5
  • 72
  • 96