PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
VS 2008 [RESOLVED] Search text file-VBForums
Results 1 to 16 of 16

Thread: [RESOLVED] Search text file

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2009
    Posts
    124

    Resolved [RESOLVED] Search text file

    Hello,

    I want to search a text file (*.txt extension) for a certain keyword or a part of it. And then let the found item be displayed in a listbox or something else.
    Now the more difficult part, how can I display the word in front of that found word ?

    Example:
    I search for VBFORUMS in a file called test.txt
    I find this:
    VBFORUMS
    but in front of that is this:
    IDS_IDS_TXT_008912 VBFORUMS

    How can I then display the IDS_IDS_TXT_008912 on a label ?


    ~Thanks in Advance
    Last edited by Hack; Jul 23rd, 2010 at 12:01 PM. Reason: Removed RESOLVED tags
    RATE MY POST

  2. #2
    Hyperactive Member BadgerBadger's Avatar
    Join Date
    Aug 2009
    Location
    Wales
    Posts
    382

    Re: Search text file

    Assuming there are lines of text in that format, try the following:

    -Loop through each line in the file and use the Contains method to check if "VBFORUMS" exists in that line.
    -If so, split that line with a " " (space) as the separator using the Split method.

    The first value in that array should be "IDS_IDS_TXT_008912".

    Obviously you may want to implement checks to make it more efficient, such as checking that "VBFORUMS" exists in a specific position in the array to make sure the line is formatted correctly.
    "The only thing that interferes with my learning is my education."

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2009
    Posts
    124

    Re: Search text file

    I get what I need to do, but I'm not that good with the Searching through files, and neither with the Split method.
    Could you give me an example ?
    Or someone else ?
    Last edited by TooLongName; Jul 23rd, 2010 at 05:44 AM.
    RATE MY POST

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,126

    Re: Search text file

    ok. post your text file, or an example of it, + i'll write you an example code

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2009
    Posts
    124

    Re: Search text file

    Thanks alot paul.

    Code:
    IDS_PROPITEM_TXT_000040	Blink Sword
    IDS_PROPITEM_TXT_000041	
    IDS_PROPITEM_TXT_000042	Slogger Sword
    IDS_PROPITEM_TXT_000043	
    IDS_PROPITEM_TXT_000044	Outlaw Sword
    IDS_PROPITEM_TXT_000045	
    IDS_PROPITEM_TXT_000046	Fairlight Sword
    IDS_PROPITEM_TXT_000047	
    IDS_PROPITEM_TXT_000048	Fairslender Sword
    IDS_PROPITEM_TXT_000049	
    IDS_PROPITEM_TXT_000050	Turtle Sword
    IDS_PROPITEM_TXT_000051	
    IDS_PROPITEM_TXT_000052	Clip Sword
    IDS_PROPITEM_TXT_000053	
    IDS_PROPITEM_TXT_000054	Oval Sword
    IDS_PROPITEM_TXT_000055	
    IDS_PROPITEM_TXT_000056	Tao Sword
    IDS_PROPITEM_TXT_000057	
    IDS_PROPITEM_TXT_000058	Jaim Sword
    IDS_PROPITEM_TXT_000059	
    IDS_PROPITEM_TXT_000060	Sepal Sword
    IDS_PROPITEM_TXT_000061	
    IDS_PROPITEM_TXT_000062	Hansel Sword
    IDS_PROPITEM_TXT_000063	
    IDS_PROPITEM_TXT_000064	Cylos Sword
    IDS_PROPITEM_TXT_000065	
    IDS_PROPITEM_TXT_000066	Comet Sword
    IDS_PROPITEM_TXT_000067	
    IDS_PROPITEM_TXT_000068	Invader Sword
    IDS_PROPITEM_TXT_000069	
    IDS_PROPITEM_TXT_000070	*****er Sword
    IDS_PROPITEM_TXT_000071	
    IDS_PROPITEM_TXT_000072	Stitch Sword
    IDS_PROPITEM_TXT_000073	
    IDS_PROPITEM_TXT_000074	Subblade Sword
    IDS_PROPITEM_TXT_000075	
    IDS_PROPITEM_TXT_000076	Multiblade Sword
    IDS_PROPITEM_TXT_000077	
    IDS_PROPITEM_TXT_000078	Bigmas Sword
    IDS_PROPITEM_TXT_000079	
    IDS_PROPITEM_TXT_000080	Panggril Sword
    IDS_PROPITEM_TXT_000081	
    IDS_PROPITEM_TXT_000082	Savage Sword
    IDS_PROPITEM_TXT_000083	
    IDS_PROPITEM_TXT_000084	Carnage Sword
    IDS_PROPITEM_TXT_000085	
    IDS_PROPITEM_TXT_000086	Knocker Sword
    IDS_PROPITEM_TXT_000087	
    IDS_PROPITEM_TXT_000088	Janitor Sword
    IDS_PROPITEM_TXT_000089	
    IDS_PROPITEM_TXT_000090	Blue Shine Sword
    IDS_PROPITEM_TXT_000091	
    IDS_PROPITEM_TXT_000092	Blue Jade Sword
    IDS_PROPITEM_TXT_000093	
    IDS_PROPITEM_TXT_000094	Shyer Sword
    IDS_PROPITEM_TXT_000095	
    IDS_PROPITEM_TXT_000096	Zeroth Sword
    IDS_PROPITEM_TXT_000097	
    IDS_PROPITEM_TXT_000098	Rowbenon Sword
    IDS_PROPITEM_TXT_000099	
    IDS_PROPITEM_TXT_000100	Emeryl Sword
    IDS_PROPITEM_TXT_000101	
    IDS_PROPITEM_TXT_000102	Khaicator Sword
    IDS_PROPITEM_TXT_000103	
    IDS_PROPITEM_TXT_000104	Chainsing Sword
    IDS_PROPITEM_TXT_000105	
    IDS_PROPITEM_TXT_000106	Axilow Sword
    IDS_PROPITEM_TXT_000107	
    IDS_PROPITEM_TXT_000108	Harpion Sword
    IDS_PROPITEM_TXT_000109	
    IDS_PROPITEM_TXT_000110	Breakest Sword
    IDS_PROPITEM_TXT_000111	
    IDS_PROPITEM_TXT_000112	Smiter Sword
    IDS_PROPITEM_TXT_000113	
    IDS_PROPITEM_TXT_000114	Runaicing Sword
    IDS_PROPITEM_TXT_000115	
    IDS_PROPITEM_TXT_000116	Shadeving Sword
    IDS_PROPITEM_TXT_000117	
    IDS_PROPITEM_TXT_000118	Fireise Sword
    IDS_PROPITEM_TXT_000119	
    IDS_PROPITEM_TXT_000120	Hotter Sword
    IDS_PROPITEM_TXT_000121	
    IDS_PROPITEM_TXT_000122	Curin Axe
    IDS_PROPITEM_TXT_000123	
    IDS_PROPITEM_TXT_000124	Rodney Axe
    IDS_PROPITEM_TXT_000125	
    IDS_PROPITEM_TXT_000126	Steel Axe
    IDS_PROPITEM_TXT_000127	
    IDS_PROPITEM_TXT_000128	Morrow Axe
    IDS_PROPITEM_TXT_000129	
    IDS_PROPITEM_TXT_000130	Crenil Axe
    IDS_PROPITEM_TXT_000131	
    IDS_PROPITEM_TXT_000132	Curning Axe
    IDS_PROPITEM_TXT_000133	
    IDS_PROPITEM_TXT_000134	Sephir Axe
    IDS_PROPITEM_TXT_000135	
    IDS_PROPITEM_TXT_000136	Shyadin Axe
    IDS_PROPITEM_TXT_000137	
    IDS_PROPITEM_TXT_000138	Gorn Axe
    IDS_PROPITEM_TXT_000139	
    IDS_PROPITEM_TXT_000140	Bronze Axe
    IDS_PROPITEM_TXT_000141	
    IDS_PROPITEM_TXT_000142	Vain Axe
    IDS_PROPITEM_TXT_000143	
    IDS_PROPITEM_TXT_000144	Grang Axe
    IDS_PROPITEM_TXT_000145	
    IDS_PROPITEM_TXT_000146	Tooring Axe
    IDS_PROPITEM_TXT_000147	
    IDS_PROPITEM_TXT_000148	Drone Axe
    IDS_PROPITEM_TXT_000149	
    IDS_PROPITEM_TXT_000150	Karm Axe
    IDS_PROPITEM_TXT_000151	
    IDS_PROPITEM_TXT_000152	Proem Axe
    IDS_PROPITEM_TXT_000153	
    IDS_PROPITEM_TXT_000154	Battle Axe
    IDS_PROPITEM_TXT_000155	
    IDS_PROPITEM_TXT_000156	Corin Axe
    IDS_PROPITEM_TXT_000157	
    IDS_PROPITEM_TXT_000158	Action Axe
    IDS_PROPITEM_TXT_000159	
    IDS_PROPITEM_TXT_000160	Crow Axe
    IDS_PROPITEM_TXT_000161	
    IDS_PROPITEM_TXT_000162	War Axe
    IDS_PROPITEM_TXT_000163	
    IDS_PROPITEM_TXT_000164	Raptor Axe
    IDS_PROPITEM_TXT_000165	
    IDS_PROPITEM_TXT_000166	Zailon Axe
    IDS_PROPITEM_TXT_000167	
    IDS_PROPITEM_TXT_000168	Berk Axe
    IDS_PROPITEM_TXT_000169	
    IDS_PROPITEM_TXT_000170	Forge Axe
    IDS_PROPITEM_TXT_000171	
    IDS_PROPITEM_TXT_000172	Ardalin Axe
    IDS_PROPITEM_TXT_000173	
    IDS_PROPITEM_TXT_000174	Galaxy Axe
    IDS_PROPITEM_TXT_000175	
    IDS_PROPITEM_TXT_000176	Dolphin Axe
    IDS_PROPITEM_TXT_000177	
    IDS_PROPITEM_TXT_000178	Ribten Axe
    IDS_PROPITEM_TXT_000179	
    IDS_PROPITEM_TXT_000180	Bonebar Axe
    IDS_PROPITEM_TXT_000181	
    IDS_PROPITEM_TXT_000182	Cantess Axe
    IDS_PROPITEM_TXT_000183	
    IDS_PROPITEM_TXT_000184	Luxior Axe
    IDS_PROPITEM_TXT_000185	
    IDS_PROPITEM_TXT_000186	Stormpak Axe
    IDS_PROPITEM_TXT_000187	
    IDS_PROPITEM_TXT_000188	Exhaust Axe
    IDS_PROPITEM_TXT_000189	
    IDS_PROPITEM_TXT_000190	Needrek Axe
    IDS_PROPITEM_TXT_000191	
    IDS_PROPITEM_TXT_000192	Shakyfin Axe
    IDS_PROPITEM_TXT_000193	
    IDS_PROPITEM_TXT_000194	Phantege Axe
    IDS_PROPITEM_TXT_000195	
    IDS_PROPITEM_TXT_000196	Hitch Axe
    IDS_PROPITEM_TXT_000197	
    IDS_PROPITEM_TXT_000198	Buterfle Axe
    IDS_PROPITEM_TXT_000199	
    IDS_PROPITEM_TXT_000200	Catchy Axe
    IDS_PROPITEM_TXT_000201	
    IDS_PROPITEM_TXT_000202	Driff Axe
    IDS_PROPITEM_TXT_000203	
    IDS_PROPITEM_TXT_000204	Fellpeed Axe
    IDS_PROPITEM_TXT_000205	
    IDS_PROPITEM_TXT_000206	Saintsail Axe
    IDS_PROPITEM_TXT_000207	
    IDS_PROPITEM_TXT_000208	Darcro Axe
    IDS_PROPITEM_TXT_000209	
    IDS_PROPITEM_TXT_000210	Flaper Axe
    IDS_PROPITEM_TXT_000211	
    IDS_PROPITEM_TXT_000212	Waturan Axe
    IDS_PROPITEM_TXT_000213	
    IDS_PROPITEM_TXT_000214	Witcher Axe
    IDS_PROPITEM_TXT_000215	
    IDS_PROPITEM_TXT_000216	Lichiky Axe
    IDS_PROPITEM_TXT_000217	
    IDS_PROPITEM_TXT_000218	Bastard Sword
    IDS_PROPITEM_TXT_000219	
    IDS_PROPITEM_TXT_000220	Two Handed Sword
    IDS_PROPITEM_TXT_000221	
    IDS_PROPITEM_TXT_000222	Darkonizer
    IDS_PROPITEM_TXT_000223	
    IDS_PROPITEM_TXT_000224	Adaptizer
    IDS_PROPITEM_TXT_000225	
    IDS_PROPITEM_TXT_000226	Zweigazer
    IDS_PROPITEM_TXT_000227	
    IDS_PROPITEM_TXT_000228	Kaleonizer
    IDS_PROPITEM_TXT_000229	
    IDS_PROPITEM_TXT_000230	Gootnizer
    IDS_PROPITEM_TXT_000231	
    IDS_PROPITEM_TXT_000232	Hauntizer
    IDS_PROPITEM_TXT_000233	
    IDS_PROPITEM_TXT_000234	Clock Slayer
    IDS_PROPITEM_TXT_000235	
    IDS_PROPITEM_TXT_000236	Two Handed Axe
    IDS_PROPITEM_TXT_000237	
    IDS_PROPITEM_TXT_000238	Great Axe
    IDS_PROPITEM_TXT_000239	
    IDS_PROPITEM_TXT_000240	Kergnition
    IDS_PROPITEM_TXT_000241	
    IDS_PROPITEM_TXT_000242	Lurknition
    IDS_PROPITEM_TXT_000243	
    IDS_PROPITEM_TXT_000244	Avnition
    IDS_PROPITEM_TXT_000245	
    IDS_PROPITEM_TXT_000246	Kanainition
    IDS_PROPITEM_TXT_000247	
    IDS_PROPITEM_TXT_000248	Orcanition
    IDS_PROPITEM_TXT_000249	
    IDS_PROPITEM_TXT_000250	Linition
    IDS_PROPITEM_TXT_000251	
    IDS_PROPITEM_TXT_000252	Hardinition
    IDS_PROPITEM_TXT_000253	
    IDS_PROPITEM_TXT_000254	May Stick
    IDS_PROPITEM_TXT_000255	
    IDS_PROPITEM_TXT_000256	Plim Stick
    IDS_PROPITEM_TXT_000257	
    IDS_PROPITEM_TXT_000258	Sirin Stick
    IDS_PROPITEM_TXT_000259	
    IDS_PROPITEM_TXT_000260	Scull Stick
    IDS_PROPITEM_TXT_000261	
    IDS_PROPITEM_TXT_000262	Tim Stick
    IDS_PROPITEM_TXT_000263	
    IDS_PROPITEM_TXT_000264	Huey Stick
    IDS_PROPITEM_TXT_000265	
    IDS_PROPITEM_TXT_000266	Bopol Stick
    IDS_PROPITEM_TXT_000267	
    IDS_PROPITEM_TXT_000268	Kudos Stick
    IDS_PROPITEM_TXT_000269	
    IDS_PROPITEM_TXT_000270	Spim Stick
    IDS_PROPITEM_TXT_000271	
    IDS_PROPITEM_TXT_000272	Sayram Stick
    IDS_PROPITEM_TXT_000273	
    IDS_PROPITEM_TXT_000274	Pero Stick
    IDS_PROPITEM_TXT_000275	
    IDS_PROPITEM_TXT_000276	Saint Stick
    IDS_PROPITEM_TXT_000277	
    IDS_PROPITEM_TXT_000278	Gogo Stick
    IDS_PROPITEM_TXT_000279	
    IDS_PROPITEM_TXT_000280	Flury Stick
    IDS_PROPITEM_TXT_000281	
    IDS_PROPITEM_TXT_000282	Gale Stick
    IDS_PROPITEM_TXT_000283	
    IDS_PROPITEM_TXT_000284	Ninegale Stick
    IDS_PROPITEM_TXT_000285	
    IDS_PROPITEM_TXT_000286	Zanne Stick
    IDS_PROPITEM_TXT_000287	
    IDS_PROPITEM_TXT_000288	Mirth Stick
    IDS_PROPITEM_TXT_000289	
    IDS_PROPITEM_TXT_000290	Hein Stick
    IDS_PROPITEM_TXT_000291	
    IDS_PROPITEM_TXT_000292	Sizzle Stick
    IDS_PROPITEM_TXT_000293	
    IDS_PROPITEM_TXT_000294	Peppermin Stick
    IDS_PROPITEM_TXT_000295	
    IDS_PROPITEM_TXT_000296	Sealine Stick
    IDS_PROPITEM_TXT_000297	
    IDS_PROPITEM_TXT_000298	Extreme Stick
    IDS_PROPITEM_TXT_000299	
    IDS_PROPITEM_TXT_000300	Pinacle Stick
    IDS_PROPITEM_TXT_000301	
    IDS_PROPITEM_TXT_000302	Marple Stick
    IDS_PROPITEM_TXT_000303	
    IDS_PROPITEM_TXT_000304	Rave Stick
    IDS_PROPITEM_TXT_000305	
    IDS_PROPITEM_TXT_000306	Cherry Stick
    IDS_PROPITEM_TXT_000307	
    IDS_PROPITEM_TXT_000308	Fanta Stick
    IDS_PROPITEM_TXT_000309	
    IDS_PROPITEM_TXT_000310	Fairmine Stick
    IDS_PROPITEM_TXT_000311	
    IDS_PROPITEM_TXT_000312	Moralemine Stick
    IDS_PROPITEM_TXT_000313	
    IDS_PROPITEM_TXT_000314	Shabere Stick
    IDS_PROPITEM_TXT_000315	
    IDS_PROPITEM_TXT_000316	Shinewing Stick
    IDS_PROPITEM_TXT_000317	
    IDS_PROPITEM_TXT_000318	Requer Stick
    IDS_PROPITEM_TXT_000319	
    IDS_PROPITEM_TXT_000320	Shalow Stick
    IDS_PROPITEM_TXT_000321	
    IDS_PROPITEM_TXT_000322	Morain Stick
    IDS_PROPITEM_TXT_000323	
    IDS_PROPITEM_TXT_000324	Prede Stick
    IDS_PROPITEM_TXT_000325	
    IDS_PROPITEM_TXT_000326	Pierlin Stick
    IDS_PROPITEM_TXT_000327	
    IDS_PROPITEM_TXT_000328	Leoss Stick
    IDS_PROPITEM_TXT_000329	
    IDS_PROPITEM_TXT_000330	Labad Stick
    There you go. Thats a part of it
    RATE MY POST

  6. #6
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,126

    Re: Search text file

    so which part of which line do you want to extract?

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jul 2009
    Posts
    124

    Re: Search text file

    Well, I enter something in a textbox, and It searches for that in the file (the names, not numbers)
    then, If it found that it will display the part in front of the name you found, if it didn't find any find anything, it will display "No ID found".
    RATE MY POST

  8. #8
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,126

    Re: Search text file

    try this:

    vb Code:
    1. Public Class Form1
    2.  
    3.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    4.         Dim match = (From line As String In IO.File.ReadAllLines(filename) _
    5.                      Where line.Contains(TextBox1.Text) _
    6.                      Select line.Replace(TextBox1.Text, "").Trim).First
    7.         MsgBox(match)
    8.     End Sub
    9.  
    10. End Class

  9. #9
    Frenzied Member
    Join Date
    Jan 2010
    Location
    Connecticut
    Posts
    1,687

    Re: Search text file

    If you are doing more than one search I would suggest loading the text file into a pair of arrays (or structure or class) and search in memory.

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Jul 2009
    Posts
    124

    Re: Search text file

    Working perfectly, but I never used Where and Select in a project of mine.
    So how do I display "Nothing found" if there is nothing with that name ?
    RATE MY POST

  11. #11
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,126

    Re: Search text file

    vb Code:
    1. Public Class Form1
    2.  
    3.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    4.         Dim match = (From line As String In IO.File.ReadAllLines(filename) _
    5.                      Where line.Contains(TextBox1.Text) _
    6.                      Select line.Replace(TextBox1.Text, "").Trim)
    7.         MsgBox(If(match.Count > 0, match.First, "No ID found."))
    8.     End Sub
    9.  
    10. End Class

  12. #12
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,126

    Re: Search text file

    Quote Originally Posted by TooLongName View Post
    I never used Where and Select in a project
    it's LINQ

  13. #13
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,126

    Re: Search text file

    if that's working ok, don't forget to mark your thread RESOLVED

  14. #14

    Thread Starter
    Lively Member
    Join Date
    Jul 2009
    Posts
    124

    Re: Search text file

    Okay,

    Thanks for the help.
    RATE MY POST

  15. #15

    Thread Starter
    Lively Member
    Join Date
    Jul 2009
    Posts
    124

    Search text file

    As I started a thread before: http://www.vbforums.com/showthread.php?&t=622404
    Sadly enough I can't unresolve it

    Everything worked fine, but there still is a kinda bug in it.

    I'm using this code now:

    Code:
            Dim filename As String = Application.StartupPath & "\item.txt"
            Dim match = (From line As String In IO.File.ReadAllLines(filename) Where line.Contains(TextBox1.Text) Select line.Replace(TextBox1.Text, "").Trim)
            If match.Count > 1 Then
                TextBox2.Text = match.First
            Else
                MsgBox("Nothing Found", MsgBoxStyle.Information, "Nothing Found")
            End If
    And if this is for example my list (Yes, It has weird names, it is from a Game)

    Code:
    IDS_PROPITEM_TXT_011432	Lusaka's Sword
    IDS_PROPITEM_TXT_011433	An exquisitely crafted weapon found in The Wilds.  It hums with power.
    IDS_PROPITEM_TXT_011434	Lusaka's Axe
    IDS_PROPITEM_TXT_011435	An exquisitely crafted weapon found in The Wilds.  It hums with power.
    IDS_PROPITEM_TXT_011436	Lusaka's Heavy Sword
    IDS_PROPITEM_TXT_011437	An exquisitely crafted weapon found in The Wilds.  It hums with power.
    IDS_PROPITEM_TXT_011438	Lusaka's Heavy Axe
    IDS_PROPITEM_TXT_011439	An exquisitely crafted weapon found in The Wilds.  It hums with power.
    IDS_PROPITEM_TXT_011440	Lusaka's Fist
    IDS_PROPITEM_TXT_011441	An exquisitely crafted weapon found in The Wilds.  It hums with power.
    IDS_PROPITEM_TXT_011442	Lusaka's Stick
    IDS_PROPITEM_TXT_011443	An exquisitely crafted weapon found in The Wilds.  It hums with power.
    IDS_PROPITEM_TXT_011444	Lusaka's Wand
    IDS_PROPITEM_TXT_011445	An exquisitely crafted weapon found in The Wilds.  It hums with power.
    IDS_PROPITEM_TXT_011446	Lusaka's Staff
    IDS_PROPITEM_TXT_011447	An exquisitely crafted weapon found in The Wilds.  It hums with power.
    IDS_PROPITEM_TXT_011448	Lusaka's Bow
    IDS_PROPITEM_TXT_011449	An exquisitely crafted weapon found in The Wilds.  It hums with power.
    IDS_PROPITEM_TXT_011450	Lusaka's Yo-Yo
    IDS_PROPITEM_TXT_011451	An exquisitely crafted weapon found in The Wilds.  It hums with power.
    IDS_PROPITEM_TXT_011452	Lusaka's Crystal Sword
    IDS_PROPITEM_TXT_011453	Crafted within The Savage Wilds, this finely tuned weapon is tough as nails, but light as a feather.
    IDS_PROPITEM_TXT_011454	Lusaka's Crystal Axe
    IDS_PROPITEM_TXT_011455	Crafted within The Savage Wilds, this finely tuned weapon is tough as nails, but light as a feather.
    IDS_PROPITEM_TXT_011456	Lusaka's Heavy Crystal Sword
    IDS_PROPITEM_TXT_011457	Crafted within The Savage Wilds, this finely tuned weapon is tough as nails, but light as a feather.
    IDS_PROPITEM_TXT_011458	Lusaka's Heavy Crystal Axe
    IDS_PROPITEM_TXT_011459	Crafted within The Savage Wilds, this finely tuned weapon is tough as nails, but light as a feather.
    IDS_PROPITEM_TXT_011460	Lusaka's Crystal Fist
    IDS_PROPITEM_TXT_011461	Crafted within The Savage Wilds, this finely tuned weapon is tough as nails, but light as a feather.
    IDS_PROPITEM_TXT_011462	Lusaka's Crystal Stick
    IDS_PROPITEM_TXT_011463	Crafted within The Savage Wilds, this finely tuned weapon is tough as nails, but light as a feather.
    IDS_PROPITEM_TXT_011464	Lusaka's Crystal Wand
    IDS_PROPITEM_TXT_011465	Crafted within The Savage Wilds, this finely tuned weapon is tough as nails, but light as a feather.
    IDS_PROPITEM_TXT_011466	Lusaka's Crystal Staff
    IDS_PROPITEM_TXT_011467	Crafted within The Savage Wilds, this finely tuned weapon is tough as nails, but light as a feather.
    IDS_PROPITEM_TXT_011468	Lusaka's Crystal Bow
    IDS_PROPITEM_TXT_011469	Crafted within The Savage Wilds, this finely tuned weapon is tough as nails, but light as a feather.
    IDS_PROPITEM_TXT_011470	Lusaka's Crystal Yo-Yo
    IDS_PROPITEM_TXT_011471	Crafted within The Savage Wilds, this finely tuned weapon is tough as nails, but light as a feather.
    And if I search for "Lusaka's", it shows this:
    IDS_PROPITEM_TXT_011432 Sword
    And if I search for any full name like "Lusaka's Sword", it doesn't find anything, I think that is because of the "Where line.Contains(TextBox1.Text)".

    How can I edit the above code to work when I search for: "Lusaka's Axe" it only displays this: "IDS_PROPITEM_TXT_011434"
    And to let that work with everything in my list.

    If you want to help there is a example list in the attachments to test.

    Thanks in Advance.
    Attached Files Attached Files
    RATE MY POST

  16. #16
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: Search text file

    Removed RESOLVED tags and merged threads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width