Python Forum
Identify two specific words next to each
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Identify two specific words next to each
#1
Hi,

I'm trying to identify two specific words next to each other and remove them from a string. I though of using REPLACE, but this can work on one word.
E.G I would receive text like this
Quote:message = '''
Good Morning

We need your input please.


Vriendelike groete/ Kind regards

Badu Thusong

Direct tel: 021 974 7313 | Email:
[email protected]


Dear Boss


How are you

today

Your number

Branch Agency: Meme

Branch Agency Code: 0329271

Thank you for contacting us


Kind regards

Agriculture Contact Centre

so I want to go through it, whenever I find
Quote:Kind regards
or
Quote:Vriendelike groete/ Kind regards
I want to remove it from the message.

Any advice?
Reply


Messages In This Thread
Identify two specific words next to each - by stahorse - Apr-26-2019, 06:18 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  identify not white pixels in bmp flash77 17 2,431 Nov-10-2023, 09:21 PM
Last Post: flash77
  Generate a string of words for multiple lists of words in txt files in order. AnicraftPlayz 2 2,792 Aug-11-2021, 03:45 PM
Last Post: jamesaarr
  guys please help me , pycharm is not able to identify my xlsx file CrazyGreenYT7 1 2,009 Jun-13-2021, 02:22 PM
Last Post: Larz60+
  Need to identify only files created today. tester_V 5 4,624 Feb-18-2021, 06:32 AM
Last Post: tester_V
  Need to identify sheet color in excel workbook chewy1418 2 2,511 Feb-14-2020, 03:26 PM
Last Post: chewy1418
  Need help to identify Mersenne Primes, I do need a search pattern. Pleiades 0 1,918 Dec-03-2019, 11:05 PM
Last Post: Pleiades
  Delete specific lines contain specific words mannyi 2 4,125 Nov-04-2019, 04:50 PM
Last Post: mannyi
  Syntax Error : I can't identify what's wrong! caarsonr 11 6,272 Jun-10-2019, 11:18 PM
Last Post: Yoriz
Photo How to Extract Specific Words from PDFs with Python danvsv 1 4,514 Jan-17-2019, 11:07 AM
Last Post: Larz60+
  Compare all words in input() to all words in file Trianne 1 2,765 Oct-05-2018, 06:27 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020