• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

REReplace

Community Beginner ,
Apr 20, 2006 Apr 20, 2006

Copy link to clipboard

Copied

Hello -

I am trying to remove a period from the end of a string and cannot seem to get it right. Here's an example of what I am trying to do.

Smith, John T. changed to Smith, John T

Also, some names do not have the "." at the end. For example: Smith, John Todd

I only need it to remove it if it is the last character in the string. I've come close with this:

#REReplace("#empinfo.Emp_Name#", ".$", "")#

It removes the last character regardless what it is. Any help is greatly appreciated.

Thanks.
TOPICS
Advanced techniques

Views

373

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Apr 21, 2006 Apr 21, 2006
Thanks to both of you for your input. I tried the "\" first since I already had the code. It worked well.

Thanks again.

Votes

Translate

Translate
Explorer ,
Apr 20, 2006 Apr 20, 2006

Copy link to clipboard

Copied

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 20, 2006 Apr 20, 2006

Copy link to clipboard

Copied

A fullstop is a special character in regexes, meaning "any character"
(hence what you're seeing). So you need to escape it by preceding it with
a backslash:

\.$

--
Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 21, 2006 Apr 21, 2006

Copy link to clipboard

Copied

LATEST
Thanks to both of you for your input. I tried the "\" first since I already had the code. It worked well.

Thanks again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation