How to delete the last 14 characters from a string
-
Dear Community -
First let me say thank you for reading and any assistance would be most appreciated. I’m not a very tech saavy person and I’m getting older by the day (and I’m already a senior citizen).
I am trying to replace every character after the semi-colon (;) in every string(?) of text in a list of parts. I have tried using Find and Replace and I have also searched for an answer but I just can’t grasp concept. Per the instructions on FAQ Desk - here is what I am trying to do:
Delete all characters after the semi-colon in each row
DRUM-00000001;DRUM-00000001
DRUM-00000003;DRUM-00000003
DRUM-00000004;DRUM-00000004
DRUM-00000005;DRUM-00000005
DRUM-00000008;DRUM-00000008
DRUM-00000011;DRUM-00000011
DRUM-00000014;DRUM-00000014Desired outcome would look like this:
DRUM-00000001;
DRUM-00000003;
DRUM-00000004;
DRUM-00000005;
DRUM-00000008;
DRUM-00000011;
DRUM-00000014;Again, thank you very for reading.
-
You asked to do TWO different things:
How to delete the last 14 characters from a string
Find:
(?-s).{14}$
Replace: nothing
Search mode: Regular expressionDelete all characters after the semi-colon in each row:
Find:
(?-s);.*
Replace:;
Search mode: Regular expression -
@alan-kilborn said in How to delete the last 14 characters from a string:
(?-s).{14}$
Dear Mr. Kilborn -
My word. Thank you so much for not only pointing out that I was asking about two different things but also for solving my issue. I’m so grateful. I’m going to try and work this out in my head so I understand this even though at my age its hard to concentrate on things like this. But I can still try.
I hope you have a great day and find joy in helping this old guy work something out that IS way out of his (my) league.
–Red
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login