Re: Automation of comp.lang.javascript FAQ



JRS: In article <ea18ek$inm$1$8302bc10@xxxxxxxxxxxxxxxx>, dated Mon, 24
Jul 2006 02:40:35 remote, seen in news:comp.lang.javascript, Richard
Cornford <Richard@xxxxxxxxxxxxxxxxxxx> posted :

<snip>
<FAQ**TRY> DRAFT
4.nn How is String Manipulation best done?

I cannot see a blanket statement about how string manipulation is "best
done" as something that could be addressed in a "quick answer". "Best"
is far too context related when it comes to working with strings.

It is meant to be the sort of "alleged question" that will lead to the
right people reading the reply.

The String Object has simple methods such as indexOf;

Without mentioning the relationship between string primitives and String
objects? An area that is frequently confused in the minds of novices.

Yes, without mentioning it. You have a strong tendency, in News, to go
into considerable depth of detail, and that is out of place in the FAQ.
Put that detail in a FAQ Note, if you like; and if it is wanted in the
FAQ proper it would be better as an entry such as "How are Primitives
and Objects related?"

<FAQENTRY> The FAQ should have a link to each individual FAQ Note. (The
actual link is not so important as the presentation of the Note
Subject). </FAQENTRY>


but, especially for complex string manipulation tasks, methods
using RegExps can be much more useful.

You cannot say "RegExps" in place of regular expressions. Certainly not
here, if at all.

Granted that "Regular Expressions" should occur once in the entry. But
"RegExp" is commonly used in News, and "RegExp" occurs in the Javascript
language whereas "Regular Expression" only occurs in descriptions of the
Javascript and other languages.

RegExps allow sought-for structures to be expressed
compactly.

Is that sentence going to convey meaning?

Ask Bart to re-express the concept! One could put "A regular
expression is a pattern of text that consists of ordinary characters
(for example, letters a through z) and special characters, known as
metacharacters. The pattern describes one or more strings to match when
searching a body of text. The regular expression serves as a template
for matching a character pattern to the string being searched." though
that would breach copyright, as would "A regular expression object
contains the pattern of a regular expression. It has properties and
methods for using that regular expression to find and replace matches in
strings." But the situation does call for brevity. Probably
"patterns" is better than "structures".

<snip>
DRAFT </FAQ**TRY>

You may not appreciate it but I have put a great deal of thought into
how regular expressions should be covered by the FAQ
...

Since there has been no visible result, your thought has so far been a
waste of time.

Remember, provided that a FAQ maintainer is prepared to change the
document frequently, the easiest way to acquire a good FAQ entry is to
insert a not-very-good one and amend in accordance with the better
responses.


When I maintained a FAQ, it was (actually, it still is) part of my Web
site, its master being among the masters of the other first-level pages.
Incremental changes could be made in the time it takes to load an editor
window, edit, save; it would be uploaded at my next dial-up. When the
topic was active, someone else CRONned every Sunday morning to copy from
the Web site and post to News.


--
© John Stockton, Surrey, UK. ???@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
Dates - miscdate.htm Year 2000 - date2000.htm Critical Dates - critdate.htm
Euro computing - european.htm UK Y2k mini-FAQ: y2k_mfaq.txt Don't Mail News
.



Relevant Pages

  • Re: Get regular expression
    ... own tree structure. ... Expression compares a string character-by character, ... regular expression solution, which was about as close as one could get to ... the structure of the hierarchy can be inferred by using ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Get regular expression
    ... regular expression solution, which was about as close as one could get to ... first string. ... explode "ABLATION" and see subnodes of "ENDOMETRIAL ... "Heart 27.33/2" ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: String Manipulation Alternatives to RegEx
    ... million bytes of text to search through, as using a regular expression is ... >I have string that is 2.5 million bytes long. ... > I tried using Regular Expressions to look for patterns and replace the> pattern found with a pre-defined text. ... > So I am looking for an alternative method as I've been told Regular> Expressions are expensive. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Emoticon text parser
    ... That is very close to a regular expression already. ... Put it all together, in a string, which requires doubling the escapes: ... We can ease the pain with the COMMENT flag of Pattern; ... as Christian suggested instead of the commenting stuff. ...
    (comp.lang.java.programmer)
  • Re: Regular expression optimization
    ... position in the replacement array of strings, ... > input string and a MatchEvaluator delegate. ... > The first part required combining the separate Regular Expression strings ...
    (microsoft.public.dotnet.general)