Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 6th, 2003, 09:33 AM
Registered User
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default unexpected behavior from microsoft web page

did you see the problem of microsoft web page?
when the site is online and you see its source the meta is wrriten in the known format but if you save the page on the disk and open it
and see its source you will see new frmat for the meta tags
(new format and the known one is shown down this page)

the other strange behavior is when u parse the online page

i want to get the keywords of this page
i make two version of regex one for each format of metaand parse by the first and if its return null i parse by the second

the problem is i can't parse the online page of microsoft.
i try to get the keywords from the online microsoft webpage by the two version of regex but it fail
and parsing the saved version on the disk this time its succeeded

regex1
@"<meta[\s]*content\s*=\s*\""\s*(?<keywords>.+?)\""[\s]*name[\s]*=[\s]*\""?keywords\""?[\s]*>"
regex2
<meta[\s]*?name[\s]*?=[\s]*?""[\s]*?keywords[\s]*?\""[\s]*?(?:lang=""en-us"")?[\s]*?content\s*=\s*\""(?<keywords>.+?)\""\s*>"

known way of meta tag

<META name="keywords" content="vacation,Greece,sunshine">

new format

<META content="vacation,Greece,sunshine" name=keywords>

sometimes wrriten as this

<META content="vacation,Greece,sunshine" name="keywords">

sometimes wrriten as this

<META
content="vacation,Greece,sunshine"
name=keywords>





My Regards





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to diplay web page inside another web page win cyberjoe C# 2 March 1st, 2007 05:35 AM
do not understand asp web form behavior dhx10000 Classic ASP Professional 9 December 13th, 2006 06:34 PM
Microsoft Office Web Components 9.0 (0x800A03EC) rekha_jsr Classic ASP Components 1 February 4th, 2006 08:19 PM
Unexpected Form Behavior SerranoG Access VBA 2 December 16th, 2004 05:50 PM
Restrict Accewss to Page Behavior retribution Dreamweaver (all versions) 2 June 20th, 2003 04:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.