|
You're welcome.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Hi, I need to strip out text from a big file and my condition is:
I need to strip out text from below
<pre>
<div class="a">apple</div>
<p>&nbsp;&nbsp;</p>
<p>red delicious</p>
<div class="b">banana</div>
<p>&nbsp;&nbsp;</p>
<p>riped banana</p>
<div class="c">chives</div>
<p>&nbsp;&nbsp;</p>
<p>fresh green chives</p>
</pre>
to below
'apple', 'red delicious'
'banana', 'riped banana'
'chives', 'fresh green chives'
so that i can enter each of them to database. I would really appreciate if you could please provide me a regex that could do this. thanks for your help!!!
modified on Tuesday, January 26, 2010 11:43 PM
|
|
|
|
|
you can edit (i.e. modify) an earlier message if you decide you need to fix an error, improve formatting, or add information.
Now please go and delete your other messages before someone attempts to read and answer them.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
At the very least, you could use Linq-to-XML to do this. Don't use Regex to parse HTML.
The class you're going to want to look at is XElement .
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hello, this is one off process and the html is stored in a csv file. I crawl a site, store each web page in csv. the url is something like www.mysite.com.au/product/product.asp?id={0} now i am storing all html for each product page in one csv. now i want to delete all the text except from the one that i wanted. could you please help how can i acheive this with regex?
|
|
|
|
|
|
but its not a valid html or xml file. its a csv file and there is lots of work to get the html or xml validation to work. any other idea or suggestions?
|
|
|
|
|
It doesn't have to be a xml/html file. It just needs to be a properly formatted XML string. Trust me - regex is not the answer.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
formatting takes ages. my element doesnt have a id. why would you come to the conclusion regex is not an answer? when i know all the text is going to be in same format?
|
|
|
|
|
I've been playing with this library (.NET 3.5 SP1 version) and trying a few snippets from various blog posts. I've also asked in the MSDN Rx forum.
This works fine
var observable = Observable.Empty<int>()
.StartWith(1)
.StartWith(2)
.StartWith(3);
observable.Subscribe(Console.WriteLine);
These produce no output
var enumerable = Enumerable.Range(1, 10);
var observable = enumerable.ToObservable();
observable.Subscribe(Console.WriteLine);
var observable = Observable.Generate(
1,
value => value <= 10,
value => value,
value => value + 1);
observable.Subscribe(Console.WriteLine);
What am I missing?
Kevin
|
|
|
|
|
|
Hi,
I need my installation project to work in a specific way. there are some folders containing files. I don't always want to install all the folders. Also I don't want to build the setup everytime, so is there a way i can use ini file or xml file to customize my setup installation. I should be able to configure the folder names and only those specific configured folders should be installed.
Thanks.
|
|
|
|
|
Any time you want to exceed the capabilities of the built-in setup builder, you should consider using an external utility, such as Inno Setup.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Is there no solution for this other than using third party software???
|
|
|
|
|
hi all.
i want to add items and sub items to menu strip dynamically
how can i do that??
thanks all;
|
|
|
|
|
if you can do it with Visual Designer, you can do it with code as well. Have a look at what designer puts into its Xyz.Designer.cs file; and/or read the MSDN documentation.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
I have an article explaining how to do that
Dynamic Menu Strip[^]
Hope it helps
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
Hello Guys,
At work I am developing a new reporting system where this small application will generate the report from an XML file and then gather the data from a database and the process the report in WORD Format. Now after i developed this application and tested it on my development machine it worked compleetly fine. But when i put it into production it was always giving me the same error "Object not set to an instance of an object". After investigating more i found out that it was crashing when it was trying to query how many boookmars there are in the word document, I found out that the Document was not being opend.
This is my code below:
Microsoft.Office.Interop.Word.ApplicationClass WordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
object filename = System.Configuration.ConfigurationSettings.AppSettings["ReportPath"].ToString() + @"\template\" + TemplateNode.Attributes["path"].Value;
object _readonly = false;
object isVisable = true;
object missing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Document WordDocument = WordApp.Documents.Add(ref filename, ref missing, ref missing, ref missing);
This code is resulting in the Object "WordDocument" being null. Now the funny thing is that this works fine in my developemtn machinie but id dosent work correctly on the server.
My Development Machine = Windows XP
Server = Windows server 2003
Anonye has any ideas as i am lost?
Regards,
Christian Pace
|
|
|
|
|
wrong file path?
access restrictions?
wrong Office version?
a code bug?
you need to open your eyes and debug the situation.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
I did the file path is correct, there are no restrictions and the office version is correct i am using the same installation on both the development machine and the server so the word version is the same. and how can it be a code bug when i went trough it on the development machine and it worked fine.
|
|
|
|
|
a program that has run as anticipated once or twice in a single environment has not proven to be correct.
Anyway, something is apparently wrong, so you should doubt all your assumptions one by one, and only trust hard observations.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Hi again,
I found the following error message in the Event log:
The description for Event ID ( 2001 ) in Source ( Microsoft Office 11 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Microsoft Office Word, .
Have any idea how i can proceed on this?
Thank you very much for your help
Regards,
Christian Pace
|
|
|
|
|
cdpace wrote: Have any idea how i can proceed on this?
idea[^]
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Hi Guys
I have the most annoying problem. I have written a very simple program that uses SQL Compact as it's data store. It works fine on Win 7, XP and Win 2k3. But when I install it on Vista (basic) I get the error message "Attempted to read or write protected memory" when ever I try and do anything with squirrel compact.
I've made sure that this problem laptop is up to date with updates, I have disabled DEP, and I am still getting the error.
The only other thing I can find is that the Memory is corrupt, but I do not know how to fix this (if this is the actual problem)
Has anyone else experianced this problem? Any idea's on how to fix it? I'm really at my wits end, and there is money at stake!!!
Thanks,
oooo, the Jedi's will feel this one....
|
|
|
|
|