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
  Writing a Linear Search algorithm - malformed string representation Drone4four 10 836 Jan-10-2024, 08:39 AM
Last Post: gulshan212
  Search multiple CSV files for a string or strings cubangt 7 7,842 Feb-23-2022, 12:53 AM
Last Post: Pedroski55
  Search string in mutliple .gz files SARAOOF 10 6,779 Aug-26-2021, 01:47 PM
Last Post: SARAOOF
  fuzzywuzzy search string in text file marfer 9 4,433 Aug-03-2021, 02:41 AM
Last Post: deanhystad
  I want to search a variable for a string D90 lostbit 3 2,585 Mar-31-2021, 07:14 PM
Last Post: lostbit
  String search in different excel Kristenl2784 0 1,679 Jul-20-2020, 02:37 PM
Last Post: Kristenl2784
  Interactive Menu, String Search? maggotspawn 3 2,541 May-11-2020, 05:25 PM
Last Post: menator01
  Re.search misses string end CaptainCsaba 3 3,243 May-25-2019, 01:46 PM
Last Post: heiner55
  binary search string help kietrichards 1 2,175 Mar-08-2019, 12:43 PM
Last Post: stullis
  ldap3 question, using a variable in search string gentoobob 1 2,851 Apr-28-2018, 11:16 AM
Last Post: gentoobob

Forum Jump:

User Panel Messages

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