Python Forum
How to find exact matching string from the text
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to find exact matching string from the text
#4
BY USING (index and find ), we able to find exact and some part of the word also. But, I want only exact .

for example,

s= 'Sports drinks seem to have become a norm in the fitness world. '


t= sports

it should return yes , but when I search
t= "spor"
it should return "no"
Reply


Messages In This Thread
RE: How to find exact matching string from the text - by desul - Apr-17-2017, 01:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Split string into 160-character chunks while adding text to each part iambobbiekings 9 9,736 Jan-27-2021, 08:15 AM
Last Post: iambobbiekings
  Reading a text until matched string and print it as a single line cananb 1 2,070 Nov-29-2020, 01:38 PM
Last Post: DPaul
  Find string return different string Kristenl2784 2 1,588 Jul-23-2020, 04:31 AM
Last Post: ndc85430
  Appending to a text string syno7878 10 4,371 May-03-2020, 10:05 AM
Last Post: snippsat
  Using an integer to manipulate a string/text variable rexyboy2121 1 1,815 Apr-22-2020, 01:37 AM
Last Post: michael1789
  Trying to extract Only the capitol letters from a string of text Jaethan 2 2,219 Feb-27-2020, 11:19 PM
Last Post: Marbelous
  help with extracting and matching values in a text file hoeleeschitt 4 58,307 May-03-2018, 05:47 AM
Last Post: hoeleeschitt
  program that search string in text file and do something alon30 1 3,295 Aug-04-2017, 08:10 AM
Last Post: buran

Forum Jump:

User Panel Messages

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