search « string « Java Data Type Q&A





1. fuzzy string search in Java    stackoverflow.com

I'm looking for high performance Java library for fuzzy string search. There are numerous algorithms to find similar strings, Levenshtein distance, Daitch-Mokotoff Soundex, n-grams etc. What Java implemenations exists? Pros and cons for ...

2. Java string searching ignoring accents    stackoverflow.com

I am trying to write a filter function for my application that will take an input string and filter out all objects that don't match the given input in some way. ...

3. Searching for one string in another string    stackoverflow.com

Let's say I have String Table that have a few strings (like mother, father, son) and now in this String Table I want to find every word that contains string "th" ...

4. Java searching a string    stackoverflow.com

I am developing a swing based application.In it,there is a JTable.The data is populated in JTable in two ways-

  1. User selects a file(File Chooser etc).Application loads the data into JTable.
  2. Application polls for ...

5. Ultra-fast "Begins With" Query from Disk    stackoverflow.com

I have a 40MB (too big for memory in this case) list of strings that I want to do "begins with" queries on to extract matches. Anyone know of a good ...

6. Optimising Strings and nested searches    stackoverflow.com

I've been working on a function that is searching heirarchally organised text. Since the files I'm working with are large in both size and number, the matter of optimisation (both ...

7. Is this KMP implementation based on a DFA more efficient than a standard implementation?    stackoverflow.com

What is the complexity of this deterministic finite state automaton based KMP algorithm? Is it more efficient than the standard,non-automaton version of KMP algorithm?

class KMP {
  private final int R; ...

8. IndexTank: how to query without a query string, geolocation only    stackoverflow.com

I know how to query IndexTank with a query string, with or without geolocation. But how do you query with no query string and only geolocation?

      ...

9. How to efficiently search on a String    stackoverflow.com

I have a text with about 300 - 500 words. Also i got about 200k keywords and i want to know if each of the keywords is contained in the text. ...





10. String seaching    stackoverflow.com

Can someone recommend me a good code/algorythm for string searching? I'm using Java. Example: How many times the word apple appears in a text.

11. IProblems with Scan, Strings and TextArea    stackoverflow.com

I'm trying to build in a search button. Upon clicking the search button, it will read in the text from JComponent outTextArea. It will read it each word, and compare each read-in ...

12. Java debugging - Searching for a string in the package in a jar    stackoverflow.com

I am debugging a Java package and I need to search for some debug statements being spitted out in the cmd to find out where in the code the program got ...

13. Invoking a same method just once in java    stackoverflow.com

I have four different classes classA, classB, classC and classD. All the four classes have the same static method search() which takes two string parameters. If i want to invoke static ...

14. Java Searching Through a String    stackoverflow.com

So I want to search through a string to see if it contains the substring that I'm looking for. This is the algorithm I wrote up:

    //Declares the ...

15. Phonetic String search for mis-spelled strings    coderanch.com

Hey Guys, I have a web application that has a search page. When a user enters a search string, I query my Sql Server database for results. However, if the user mis-spells a word in the search string...the database does not find anything. Does anyone know have to handle intelligent phonetic searches. I'm CLUE-LESS, so I'll appreciate any insight...

16. strange string search bug    coderanch.com

Ive made a small method which searches for a string within a string of text. It outputs the two strings which it is currently comparing and true or false if they are the same or not. However, even when they are the same it outputs false! String dataText = "rum rsssdkjasdfjfdsa sddfh sadihidhash;l"; String searchOne = ""; int maxSearchPos ...





17. How to search for a backslash in a String?    coderanch.com

Check this out: public static void main(String[] args) { String strX = "ldr\tes"; String u = "\u005c""; String v = "\u005C""; String w = "\\"; int backSlashA = strX.indexOf("\u005c""); int backSlashB = strX.indexOf("\u005C""); int backSlashC = strX.indexOf(w); System.out.println("backSlashA: " + backSlashA + ", backSlashB: " + backSlashB + ", backSlashC: " + backSlashC); System.out.println("u: " + u + " v: " ...

18. How to search a string value inside a Bean class    coderanch.com

Hi, I have a list of beans stored in an ArrayList and I'm iterating the list to get each bean out of it. I have a String value to be checked inside the bean. I don't know what the field name of the String value to search in the bean. For eg: The bean might have some three fields say AA, ...

19. search hard-coded string occurrences    coderanch.com

If I understand correctly, the first step would be to list all the files in the package and work through them. That's a pretty common question around here, and one we don't have a good answer for. There's no API. You might be able to iterate the classpath and find the folder or jar where the package lives and iterate files ...

20. Search String    coderanch.com

Hi All, I am trying to search string in a ArrayList of strings as we search a database with wildcards. For example Suppose Actual String is: - HTML is not enabled Search query 1: %HTML% Search query 2 : %TM% is not %nab% Search query 3 : HTML is *o* (* and % both same (like wild card searches) Search query ...

22. searching a string    coderanch.com

23. searching strings again    coderanch.com

24. String searching    coderanch.com

I'm trying to implement a language filter on a message board. Essentially I'll have a list of words in a database that are flagged as inappropriate. I need to search the incoming string from the post for those words. I only need to detect if any of them exist. Of course, I can just search on each individual word with a ...

25. Searching & Replacing Strings    coderanch.com

public String replace(char oldChar, char newChar) Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar. If the character oldChar does not occur in the character sequence represented by this String object, then a reference to this String object is returned. Otherwise, a new String object is created that represents a character sequence identical to ...

26. how to string search ?    coderanch.com

Let's clarify the situation a bit. Do your text files contain text or do you have files that actually contain String objects and were probably created using an ObjectOutputStream? If you have text files that contain text, then how do you want the text to break up into Strings? Do you want a String to be created by text in the ...

27. search string from bigger string    coderanch.com

Hi I have a big string. For example: bigString="This is big string. Big string is not small"; and i have small string: smallString="is"; and i have to find how many matches with small string i have in big one. As a result there should be 2 matches. I have searched the whole string class doc and nothing simple has not come ...

28. string search & replace    coderanch.com

Hi, Pls help me with this issue. Contents of the text file: bla bla bla %s bla bla bla bla ...more contents here... %i bla bla %s --end of text file. I would like to replace the %s,%i,%s with 3 values i pass in the arguments. eg. if send 1,2,3 then contents of the text file should have %s replaced with ...

29. Search and replace \n in string    coderanch.com

30. String Search Using Java....    coderanch.com

Hi Everyone, I am trying to search a text file using JAVA. But my problem is i need exact matches of the occurrences. That is not happening. I am trying with contains() method to search for the string. For example... I have a file which contains John is good boy. Marie is a good girl. Jack is good boy. Johnny is ...

31. string search    coderanch.com

Good evening, I am looking for some help in understanding my mistake(s). I am trying to parse a log file to see how many error messages in total I receive per day, that appears to function; however I am also looking to see how many error messages per hour I am getting and that's not wokring the way I would like ...

32. Java String Search Algorithm/Implementation    coderanch.com

Dear Sirs et Madames, I am trying to implement a "Search Engine" of sorts that can search for a specific location/s based on user input in a search field. ... for example I have a location called IKWIRIRI (a little village in Tanzania): but allowing for errors in spelling from the user, I need a search algorithm/implementation which can allow for ...

33. Unable to Search String...    coderanch.com

34. Fuzzy String Search    coderanch.com

I am looking for a Java fuzzy string search algorithm that will handle misspellings, words out of order, and abbreviations. The users of the application I am creating this for should not have to add any special characters or logical operators. I have tried Lucene, but it doesn't provide as good of results as an older technology that I am trying ...

35. Help needed in searching a particular string    coderanch.com

I tried to make a sample code using scanner, but it doesn't work right, it only scans one character at a time. I've used this method before, but I don't see what's wrong. package mooseSaloon; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.Scanner; public class ScannerExample { public static void main( String[] args ) { // Write the sample ...

37. Using arguments to search for a string    java-forums.org

Hey, I'm trying to create a program that takes a string and different text files in the command line arguments and then searches those files for said string and returns all text lines containing it. A sample command line is: java Find [string] The code I have so far is below. I honestly am completely stuck in terms of ...

38. How to Search a String from a cell.    java-forums.org

39. String search    java-forums.org

Probably not. You would normally look up the String functions in the Java API, decide which one meets your requirements and use that. Behind the scenes it may well be doing a character by character search, although it is possible that it may be optimized at runtime to invoke native byte level searching (still byte by byte). Important point is to ...

40. Search an of objects for a string    forums.oracle.com

I have an array which contains phone objects..each object contains lastname, firstname, address and telnumber. eg array called entry has values entry[2] = ('smith', 'paul' , '44 test st' , '123456) and so on for each cell in the array. How do I write code to search the array by lastname, where lastname to look for = 'doyle'.... can this be ...

41. string search    forums.oracle.com

It would help if you fully explained your friggin requirements in the first place. You claimed that there was no association between the substrings and the output but there clearly is. Isn't there? If my input is aaaba then the output should be 0. Due to aaa = 0 and you "consume" those letters leaving ba to match against. If this ...

42. How do I search a string    forums.oracle.com

43. String searching and editing    forums.oracle.com

The whole package is in http://forum.java.sun.com/thread.jspa?threadID=5157369&tstart=0 if you want to look at it. It's going to be OOS anyway so I don't care to show the whole code. I'm doing this because GNOME-Mud sucks and DSL really deserves something good for all platforms. Right now (when it works) it will do the same as GNOME-Mud with the exception of showing the ...

44. Need help on designing a string search program.    forums.oracle.com

Hi, I need help in creating a program that would: Read in a string and convert it to lower case, Check if it's a valid string of alphabetic characters only. Afterwards, the user would enter in word which is searched within that string and reports how many times that word appears in the string. I managed to get the code for ...

45. searching for string    forums.oracle.com

iam reading some value from a file and write to another file.In the reading file contains 268520629#268771030 1024560 01000908 these following i want output 1024560 () inside order item .......in the above case() comes two times but inside&i only need.....these are differnt lines.....can any body please help with code Donot tell me to use ...

46. Searching a string, ignoring capitals    forums.oracle.com

47. Search string.    forums.oracle.com

Umm.. I will go little in detail, The input is stored in string 'displayName'. displayName: 123.sap.com.frxc.pqr name_str = displayName.substring(12,4) It worked fine, But now i came to knod that frxc does not always starts at index 12! eg: 123.java.com.frxc.obs 123.nnn.any.frxc.thing So, is there any other function i can use, instead of subString?

48. searching for a string    forums.oracle.com

hi all, I need to search for a string 10:00:00 10:00:00 10:01:00 10:01:01 10:02:00 10:02:00 10:02:00 10:03:32 etc If the input is that start time is 10:00and end time is 10:02 i need all the lines in between them to be saved in a new text file. Can any one help me regarding this?

49. Searching a string for repeating text    forums.oracle.com

Fmwood123 wrote: Howdy, I'm trying to search a string for repeating text. In this context, repeating means it appears verbatim at least three, but possibly more than three, times. Two is not considered repeating. I have something that works, after a fashion but I'm having trouble figuring out how to get it to only return values for matches that occur three ...

50. Searching a String    forums.oracle.com

hansMoolman wrote: Had a quick look at the Pattern/Matcher but its a bit above the scope of what I am trying to do. All i need to do is enter a String and store it as an array, then I want to pick any random letter and search the array and see if it contains the particular letter. I also have ...

51. String search    forums.oracle.com

I have two sets of strings. A and B. I have to check for every string in B if it exists in A. What is the memory optimum solution to implement this? Is using HashTable the best option? if yes, as I will have all the keys as the strings from set A, what should be the values for these keys. ...

52. faster string search options    forums.oracle.com

Hi I am an intern at a mobile technology firm assigned the job of enhancing the search performance of a tool, which is coded completely in java. This tool, along with other features basically searches for the substring in a string array by using the string.indexof() method which is very slow, since i am dealing with vast amount of data.. Now ...

53. String searching ...    forums.oracle.com

Hey Friends, I am trying to write a program in which i have a main string and a character or a substring. I have to check how many times and on which indexes a character or substring occur in main string. For example String1= "JavaDiscussionforum"; String2="s"; S is on index 7, 10, 11 I know how to get first index of ...

54. like %, string search    forums.oracle.com

Hi all, I am making a application in which there is string search but i dont know how to find a solution. For example in sql, there is (like %) expression to find similar words. But in java how can I do that. For instance word1 = mehmet, word2 = mehemet. How can i do it? Thanks...

55. Search for a string    forums.oracle.com

56. how to do search string value and integervalue    forums.oracle.com

Hi,,, I'n our office program thre is a internal search page which we need to connect to the data base tables. my question is can i take a string as an search input and search the integer value that is stored in a perticular table. I also need to search sring values which is working fine , i cannot search the ...

57. String Comaparison and search    forums.oracle.com

I am searching names of files given a only a part of the string like 1.'inte' for 'InternetFile.htm' or 2.'int' for 'IntranetFile.htm' and 'InternetFile.htm' 3.'net' for 'InternetFile.htm' or 'InternetFile.htm' or'Netting.htm' What class I have to use for searching the names because of case of sensitiveness of the filenames. The names of the files are all stored in as strings.

58. Searching a large amount of strings    forums.oracle.com

I am trying to create code that will search a large amount (currently 8000, but probably going to expand to 100's thousands) of Strings. Each String can be 1 - 100 words long and has be typed by hand (i.e. not consistent spelling, grammar etc). I am hoping to do lots of searches on this database trying to find similarity amongst ...

60. String searching    forums.oracle.com

61. String search method too slow    forums.oracle.com

I'm trying to search a string for keywords, but the problem is that the way I doing, is too inefficient. In an example string: testing Keyword1, dsds, dsa Keyword2, hi, Keyword3 my program would run through the string three time, the first time searching for the Keyword1 match, the second time, Keyword 2, and so on. It work ok for a ...

62. Efficient Search on Large Strings    forums.oracle.com

I don't know about the complexity of intern, either, for sure, but I suspect that it is at least O(n), because it needs to check to see if the string has already been interned. Realistically, calling String.intern() on every string to be evaluated immediately before evaluating them is basically useless, because the complexity of String.intern is very probably the same as ...

63. How to search a string in some folder.    forums.oracle.com

Hi , In my application users will upload some pdf,xls files to server. files will be saved in server. From the front end can search on all files with some specific string. If that string is there in any of the file, user has to get link to download that file and the text just before and after that user string. ...