0

search from the end of a string

How do I use regex to go to the end of a string and find the last period?

by
  • A
  • Apr 13, 2013
6 Replies
    • A
    • Apr 13, 2013

    i don't think my question is clear. I've shortened my description to the first 150 characters. Now I want to go to the end of the string and search backward for the last period. Thanks for all help.

    0
  • post the link to your pipe.

    Thanks -Paul

    0
  • Rather than backward, it's just an issue of greedy or non-greedy * quantifiers. Greedy will work for you.

    In item.description replace (..). with $1

    0
  • [This forum's markdown and basic html for formatting is a pain. Re-posting...]

    Rather than backward, it's just an issue of greedy or non-greedy * quantifiers. Greedy will work for you.

    In item.description replace (.*\.).* with $1

    0
  • SR,

    YDN is going to do a release next week to fix those formatting issues.

    Thanks -Paul

    0
    • A
    • Apr 19, 2013

    Many thanks, SR. That's the advice I needed.

    0

Recent Posts

in Pipes