473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

word search

Hi,
i'm trying to write a program that finds single words that works like this:
i'd like to find a word, the exact word, without making mistakes like, when
i'm looking for 'cow', he tells me he found it in 'coward'.
I have an idea how to do this in C, but i guess it would be less complicate
in python.
The findall() function would be ok, but i need to make some modifications
like this one:
I want the program to find matches only when the word isn't in the middle
of other letters. Other kinds of chars instead are accepted. (for instance:
' cow ', '_cow_', '(cow)',' -cow, ' are right matches).
I need this for a program that does the following: i've got a list of song
titles, saved in a txt file for example, and a list of filenames in a
directory (mp3 files), and for each song title i want to find the best
match in the filenames.
Then when all the matches are done I modify the mp3 files' tags according
to the information in the txt file.
I know there are windows programs to do this, but they don't have functions
like taking a text list and find the corresponding mp3 on their own.

And two little questions:

1-i read in the manuals that if i want "search()" to ignore the case, i
have to put the flag I. I can't get this to work. Could you write me an
example of how to write this? I
2-how can i make also "findall()" be case UNsensitive?

Thank you.
Jul 18 '05 #1
0 1080

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matthew Robinson | last post by:
i wrote a search page for my site (searching through a mysql database) but when i type in more than one word (eg "item three") in the search field it gets passed to the page as a single word...
11
by: Sandfordc | last post by:
I have tried several time to do this but have been unsucessful. I tried something like: myFunction(charater) str=frm.s1.value sb1=str.substring(0,charater)...
4
by: larry | last post by:
Hi, I would like to use window search to search a word in C# CS file which create by visual studio. But I can never get that word in the cs file. for example, I used a name space:...
2
by: Andrew Cranwell | last post by:
Hi, Please redirect me if I am in the wrong group for this question... this is my first post to this group, so I hope it is clear! I am working on an automation project in VB.NET and have to...
0
by: Zeljko | last post by:
VB.net 2005 express - Office Word 2003 Office 11 library =references I need to make from VB.net search in Word for these words: "tree", "bus", "car"...(complete list contains ca. 50 words) when...
3
by: tdemartino | last post by:
I've been searching for days, using MS help and I can't find the answer on my own. I have this code in my Access Form: If Not IsNull(Me.txtFilterDescriptionMatName) Then...
1
by: vmoreau | last post by:
I have a text and I need to find a Word that are not enclosed in paranthesis. Can it be done with a regex? Is someone could help me? I am not familar with regex... Example looking for WORD:...
2
by: Ola K | last post by:
Hi guys, I wrote a script that works *almost* perfectly, and this lack of perfection simply puzzles me. I simply cannot point the whys, so any help on it will be appreciated. I paste it all here,...
11
by: grantstech | last post by:
I have successfully created a program that searches for a word in multiple files but now I need to be able to search by more than one word. I have add code from a previous discussion to my original...
4
by: paul814 | last post by:
Hello everyone, Right now I have a simple PHP page setup that takes whatever was entered into txtsearch on the previous page, it searches my DB by that word and brings back the whole record based...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.