Muhammad S

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromMuhammad S
ToMe
SubjectSuggestion to include RegExp Refference and Thanks...
Date3 April 2008 07:21
Hi
Let me first express what I feel about <http://www.howtocreate.co.uk>
...

To make a long story short it was the most pleasant web surfing
experience I've had to this day (and I've been online longer than I care
to remember) honestly I have never visited a site where the user was
cared for more, even in theoretically user-friendly commercial
websites...
To name a few of my favorite: the layout, the speed, the design, the
ease of use...I could go for hours.

Having said that I have a simple suggestion to make, why not include a
Regular Expression Reference? I'm sure you'd write a great one!

I also would like to contribute this bookmarklet, if you find it clean
enough I hope you add it to your excellent bookmarklets page, It is used
to remove links from a page, I use all the time before printing a page:

javascript:(function(){h=document.body.innerHTML;h=h.replace(/<A.*?>/gi,
	'<span>').replace(/<\/A>/gi,'</span>');document.body.innerHTML=h;
})()

finally I'd like to thank you and wish you a great life.

--
  Muhammad S
FromMe
ToMuhammad S
SubjectRe: Suggestion to include RegExp Refference and Thanks...
Date3 April 2008 23:31
Muhammad,

Thankyou for your compliments.

> why not include a Regular Expression Reference?

The trouble with regular expressions is that they are incredibly complex
things. While simple enough to begin with, mastering regular expressions is
the subject of entire books. I really could not do them justice in my
tutorial.

While it would still be possible to provide only a reference of all the meta
characters that are available, this would simply mean duplicating work that
is already covered in many other places already. I feel that it is better
for me to simply refer to an official reference for them instead. In the
JavaScript tutorial chapter on variables, I link to the official
documentation that was produced by the creators of JavaScript. It is no
longer updated, but regular expressions in JavaScript have not really
changed since the documentation was produced, so it is complete enough.

> It is used
> to remove links from a page, I use all the time before printing a page:

In return, I offer you a potentially better solution that requires no
interaction at all before printing:
@media print {
a { color: inherit !important; text-decoration: none !important; }
}
Put that in a user stylesheet, and tell your browser to use it. I have given
details of how to apply user stylesheets here:
http://www.howtocreate.co.uk/userStyle.html

Hope this helps.


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.