Getting Text Between Two Words In Text File

Hi everyone,

Im just wondering what the best way to do this would be.I need to get a certain line of text from a number of text file records.This text lies between "-" and a </strong> tag. How would I go about this
Thanks for your help!
julie
0
Jewly
8/31/2004 10:12:33 AM
asp.net.getting-started 91979 articles. 4 followers. Follow

1 Replies
852 Views

Similar Articles

[PageSpeed] 27

Use the File class to open and read your file and then use Regular Expression to find the specific word.

References:
File Class
Regular Expression

"I refuse to sign my posts with some clever quote said by some famous tech head in order to make myself seem more intelligent"


-- Bill Gates
0
Nabil
8/31/2004 11:47:24 AM
Reply:

Similar Artilces:

How do I get the Text of a Text ....
That may sound confusing, but I need to get the text of a Dynamically created text object. For each row the Text objects text might be somthing different, and when I loop through all the rows, I need to see if any of them are a certain Word. When I used Getitemstring, it doesn't like it. dw_1.Describe( 'text_control.text' ) will give you the .text attribute of a text control in a datawindow. How are you getting different values for the .text attributes on different rows? Using an expression or something? -- Paul Horan[TeamSybase] VCI Springfield, MA www.v...

length or trim ? how can i get textbox.text as text that publichouse to textbox.text as text that public ?
hello friends length or trim ? how can i get textbox.text as text that publichouse to textbox.text as text that public ? second example is ..... textbox1.text is greenhouse.. i want to get green from textbox.text cheer Mark as me if my question or my answer can be helpful for you :) Hi,you can always perform a Trim to a retrieved string to delete the leading and trailing space characters. For your second example where you want to gt a part of the retrieved string you can use the SubString method of the String class.Grz, Kris. Read my blog. Handy Firefox plugins for web developers.Workar...

How Can I Get Random Words From A Text File
I am looking for a program that will pick random words from a text file and allow me to copy them to another application. It would be cool if the I could set it to pick say 20 or 30 words at a time. Anyone know of such a program? TIA In message <MPG.1d411bd228fdcfdd9896c4@news.grc.com>, dfrosty <dfrosty1@gmail.com> writes > >I am looking for a program that will pick random words from a text file >and allow me to copy them to another application. It would be cool if >the I could set it to pick say 20 or 30 words at a time. Anyone know of >such a progr...

Programmatically getting text from resource file: can't get GetGlobalResourceObject to work :(
I have a site that uses resource files to translate my site into various languages.  It works fine for basic labels and such on the site.  However, I am now translating my dynamically generated error messages and I am having trouble.  After several hours of trying last night I discovered the GetGlobalResourceObject method, but I am having trouble with getting the correct syntax. Here's a snippet from my script:  if (pwd != "")                    {  &nb...

Get data from a text file to an HTML file
I am trying to read data from a text file ( has a username and usercode columns) to display on an html page. It there a way to do that? The text file changes information daily. I guess it would be better to have an xml file in place of the text file, then you would apply XSLT to the XML and display them on the page as html. Regards  Bilal Hadiar, MCP, MCTS, MCPD, MCTMicrosoft MVP - Telerik MVP The text file is generated from another program so I can't change the type of file.   Look at the System.IO namespace. Thare are readers in there where you pass in th...

Can someone tell me why I can't get this sentence to get displaye d from a text paragraph file:(
# loop & search for file: while(<>){ print if ($ARGV=~/^has been working very hard.$\i); } Error Msg Search pattern not terminated at line 13. Many Thanks! ...

DOM, how to get text out of text node
Hi all, i am stack on this: i am parsing a dom document, i reach a text node, but i can't get the text out of the text node. Hope some one can help. this is the code: childs is a nsIDOMNodeList. PRUint32 len, i; childs->GetLength( &len ); nsCOMPtr<nsIDOMNode> child; nsEmbedString name; nsEmbedString value; PRUint16 type; for( i = 0; i < len; i++ ) { childs->Item( i, getter_AddRefs( child ) ); child->GetNodeType( &type ); child->GetLocalName( name ); ...

RE: Can someone tell me why I can't get this sentence to get disp laye d from a text paragraph file:(
> print if ($ARGV=~/^has been working very hard.$\i); That second slash is going the wrong way (\ instead of /) ____________________ Chris Spurgeon Senior Design Technologist cspurgeon@electronicink.com ELECTRONIC INK One South Broad Street 19th Floor Philadelphia, PA 19107 www.electronicink.com t 215.922.3800 x(233) f 215.922.3880 -----Original Message----- From: AMORE,JUAN (HP-Roseville,ex1) [mailto:juan_amore@hp.com] Sent: Monday, October 15, 2001 5:28 PM To: Beginners@Perl. Org (E-mail) Subject: Can someone tell me why I can't get this sentence to get...

Copy web text fr FF2 PASTE to outlook text mail msg get an attachment not text
I never had this problem with IE. When I copy text from a web page and try to paste it as text into an Outlook2000 TEXT mail message, it instead is rendered into an attachment to the message. I just want to paste the text. Does anyone know why this happens, better yet - how to fix it? Currently I have to past the text into a text editor, and then recopy that into my Outlook mail message. This is getting old fast. Thanks in advance. Sandalls On 2/23/2007 5:01 PM On a whim, Sandalls pounded out on the keyboard > I never had this problem with IE. > > When I co...

How do I get the left part of a text box.text
How do I get the left part of a text box.text???Something like: textbox1.text.left(3) to get 'abc' if the text box contains the alphabeth.But then the correct way You can do something as: string mainString = "abcdefg....";string strSubString = mainString.SubString(0,2); Hope this helps, RegardsBilal Hadiar, MCP, MCTS, MCPD, MCTMicrosoft MVP - Telerik MVP Use the Substring() method.string tempstring = TextBox1.Text.Substring(0,3); thanks all...

How to get plain text of currently displayed text
I need to get text of currently displayed page from extension. var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); var mainWindow = wm.getMostRecentWindow("navigator:browser"); alert(mainWindow.getBrowser().selectedBrowser.contentDocument.getSelection().toString()) This returns only selected text. I need to get all text content but has no glue how to do this. Please help. Alex On Dec 17, 5:15=A0am, dzen <dze...@inbox.ru> wrote: > I need ...

How to get a text from rich text edit control ?
It does not have a such property as 'Text'. So how can I catch in to variable whatever user types ? Thanks. string ls_text this.SelectTextAll() ls_text = this.SelectedText() On Thu, 24 May 2001 11:43:44 -0400, in powersoft.public.powerbuilder.general yt <tyuriy@aol.com> wrote: >It does not have a such property as 'Text'. So how can I catch in to >variable whatever user types ? > >Thanks. > > Bruce Armstrong [TeamSybase] http://www.needhim.org ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_news...

How does text gets displayed in composer text field?
Hi, I'm new to TB dev. I stumbled upon this problem while trying to fix bug 309= 708. I am trying to figure out how does a message gets displayed in the com= poser window? I noticed that when I click edit on a mail in my drafts folde= r, the text in the uncompleted mail is displayed in the composer. I want to= do something similar to this. Does anyone know how does TB copy the text from the mail and display it on = the composer window? Is there like a textField.setText() to put the text into the composer's edi= ting text field? In another words, what function should i ca...

Getting evaluated text value for text objects
I'm attempting to get the visible text value out of a text object in a report. If I describe the .Text attribute, I can get the text out, however, if the value is an expression I get the unevaluated string. I can describe the Evaluate function called with the .Text attribute as the argument, and this will normally return the evaluated text from the element. The problem I have encountered is when you have, for example, a field named "phone" and the text value of the text element is also the word "phone". Calling evaluate on this will replace the word &quo...

Web resources about - Getting Text Between Two Words In Text File - asp.net.getting-started

Bald eagle dislikes Donald Trump
Is this symbolic for something? If only there was one perfect gif to demonstrate how America should react to Trump... pic.twitter.

Our favorite new iPhone feature Apple added in iOS 9.2
Better late than never, as the saying goes, and this time we’re talking about the iPhone getting a feature you’d think it should have had from ...

The FBI director just gave a striking example of how much of a problem encryption has become
Encrypted communications are increasingly thwarting intelligence agencies that are working to detect terrorist activity. And a comment Wednesday ...

Yahoo's board says it is still backing Marissa Mayer and has 'complete confidence'
Yahoo CEO Marissa Mayer has struggled to deliver the comeback investors expected for the internet company when she was hired more than three ...

Here's All the Evidence That Craig Wright Invented Bitcoin
Parallel Gizmodo and Wired investigations into the identity of mysterious Bitcoin creator Satoshi Nakamoto, published yesterday, pointed to Australian ...

SAG Awards: A Motley Mix of Contenders in TV Movie Races
Queen Latifah won raves and an Emmy nomination for her portrayal of blues legend Bessie Smith in HBO’s “Bessie,” making her a cinch for a SAG ...

Flickr launches virtual reality 360-degree photo app for Samsung Gear VR
Flickr is diving into the world of virtual reality in order to provide you with a new photo experience. The company has launched a virtual reality ...

Affirmative Action at Public Universities Is Surprisingly Ineffective
Over at 538, Hayley Munguia has an article titled "Here’s What Happens When You Ban Affirmative Action In College Admissions." Her charts surprised ...

Google, NASA's quantum computer is 100 million times faster than yours
Unless you too own a quantum computer, Google and NASA likely have you beat, but there is a caveat. Google and NASA announced at an event at ...

‘Victoria’s Secret’ Ratings Hit Low, ‘Scream Queens’ Ends Season Even, ‘The Flash’ Stumbles In Winter ...
It was a night of winter finales and a certain annual fashion show on Tuesday, as well as assertions from Selena Gomez that indeed she does sing ...

Resources last updated: 12/9/2015 7:04:15 PM