Python Forum
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
search a string backwards
#1
i recall once seeing a function or method that would find the position of the last instance of a substring in a given string. now, i could use it, but i cannot find it in the documentation. do i need to write my own or come up with better search terms?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
I think you mean str.rfind()
Reply
#3
yes, that is, now that i have the name to search on.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to read a file as binary or hex "string" so that I can do regex search? tatahuft 3 1,217 Dec-19-2024, 11:57 AM
Last Post: snippsat
  Arabic to Roman numerals conversion(and backwards) duzho 3 1,286 Aug-25-2024, 04:59 PM
Last Post: deanhystad
  Writing a Linear Search algorithm - malformed string representation Drone4four 10 4,277 Jan-10-2024, 08:39 AM
Last Post: gulshan212
  Search multiple CSV files for a string or strings cubangt 7 13,365 Feb-23-2022, 12:53 AM
Last Post: Pedroski55
  Search string in mutliple .gz files SARAOOF 10 10,003 Aug-26-2021, 01:47 PM
Last Post: SARAOOF
  fuzzywuzzy search string in text file marfer 9 8,894 Aug-03-2021, 02:41 AM
Last Post: deanhystad
  I want to search a variable for a string D90 lostbit 3 3,498 Mar-31-2021, 07:14 PM
Last Post: lostbit
  String search in different excel Kristenl2784 0 2,146 Jul-20-2020, 02:37 PM
Last Post: Kristenl2784
  Interactive Menu, String Search? maggotspawn 3 3,522 May-11-2020, 05:25 PM
Last Post: menator01
  Re.search misses string end CaptainCsaba 3 4,177 May-25-2019, 01:46 PM
Last Post: heiner55

Forum Jump:

User Panel Messages

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