Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: strip out anything inbetween brackets

by ww (Bishop)
on Apr 05, 2005 at 15:19 UTC ( #445008=note: print w/ replies, xml ) Need Help??


in reply to strip out anything inbetween brackets

In addition to the suggestions about, you may also wish to note that the "(" and ")" in your question are "parentheses" rather than "brackets" (which come in several flavors, including square, [ and ], curly, { and } and < and >). It's UNimportant in this case, but would be very significant in most code.

Likewise, what you call "speech marks" are (if I understand you correctly) "quotation marks" or, loosely and idiomatically, "double quotes" (to distinguish from single quotes, " ' "

and I second the above: get an account. You'll find the monastery a welcoming and helpful place.


Comment on Re: strip out anything inbetween brackets
Re^2: strip out anything inbetween brackets
by Smylers (Pilgrim) on Apr 05, 2005 at 16:43 UTC
    you may also wish to note that the "(" and ")" in your question are "parentheses" rather than "brackets"

    Don't be so dogmatic! I don't know where the original poster is from, but in everyday speech (and indeed punctuation manuals) in the UK "(" and ")" are indeed called "brackets"; the same may well be true in other places. The word "parentheses" is known in the UK, but it's rarely heard and somebody using it risks sounding pretentious.

    Likewise, what you call "speech marks" are (if I understand you correctly) "quotation marks" or, loosely and idiomatically, "double quotes"

    "Speech marks" is also a commonly understood term in the UK.

    TMTOWTDI! Other people may come from cultures which use different terms for some things. That's OK — as human beings we can cope with occasionally having to take a second longer to read an unfamiliar phrase. It certainly doesn't mean that 'your' terms are 'right' and the other person's are 'wrong'.

    Smylers

      smylers:

      You're right, of course. I, especially, should not fall into a regionalistic trap like that. but, on the other hand, I will cheerfully risk begin viewed as "pretentious" if that's the result of an effort to communicate clearly, in the language of the listener or reader.

      But, for my info, how does UK-English distinguish among parens, squarebrackets, angle-brackets and curly-brackets? (others offering distinctive regionalisms or national-useages encouraged too!)

      and, for what LITTLE it's worth, I do not recall hearing (as a child in Edinburgh) any teacher referring to "" as speech-marks.

        I will cheerfully risk begin viewed as "pretentious" if that's the result of an effort to communicate clearly, in the language of the listener or reader.

        Oh, that's fair enough &mdash you're allowed to do that yourself, and in a Perl forum I agree with you and personally would say "parens" — but it seems a bit off to try and force pretentiousness on others!

        how does UK-English distinguish among parens, squarebrackets, angle-brackets and curly-brackets?
        (...)brackets
        [...]square brackets
        <...>angle brackets or angled brackets or pointy brackets (no real standard term, as they don't occur much as punctuation symbols in everyday life, outside of computer coding)
        {...}braces

        Smylers

Re^2: strip out anything inbetween brackets
by Jasper (Chaplain) on Apr 05, 2005 at 17:01 UTC
    I'll take some issue with some of your linguistic pedantry. :)

    Parentheses are a type of bracket, surely. What do they do but bracket things? You point out that backets come in the square, curly, and angle flavours. Why leave out round flavour?

    What's wrong with using the term 'speech marks'? Speech is double quoted in almost all literature I've come across, and I certainly grew up referring to double quotes as such. To insist on calling them quotation marks seems odd, especially when you go on to talk about double and single 'quotes' ('quotes' almost certainly being an abbreviation of 'quotation marks'). I've always called single quotes single quotes, though.

    While I appreciate your intent to educate, I do think you're incorrect or misleading on some of these points. But do correct me if you think I'm wrong.

    I'd like to point out that I was doing some work while writing this reply, and smylers nipped in in front of me ;)

      oops. Now ya got me ranting (and nitpicking): despite the smile, "pedantry" (of which I can be guilty :>}) twists my arms and makes me disagree (on grounds of insuffient precision and breadth) with "Speech is double quoted in almost all literature I've come across,...."

      Specifically, printed versions of speech are customarily double-quoted except when that speech is both single- and double-quoted (a quote of another utterance) and, in fact, depending on the narrowness of your definition of speech (ie, if narrower than a (US?) legalism in which speech includes writing, and sometimes even throwing paint at a wall), then double-quotes are also used to indicate an utterance in words, regardless of the technique.

      [/rant]
              :<}
Re^2: strip out anything inbetween brackets
by RazorbladeBidet (Friar) on Apr 05, 2005 at 17:17 UTC
    While understanding the viewpoints of Jasper and Smylers, I have to say that ww makes a good post.

    I myself (an American English speaker) was somewhat confused by the usage of brackets as opposed to parentheses. I only smiled slightly at the use of "speech marks" - which simply looked odd to me.

    It is most understandable that certain cultures/languages say things differently (as noted by our two friends across the pond). However, I have learned that these things are, in fact, commonly used elsewhere simply because of the post. And while it is prideful to think this site belongs to any particular culture, I think ww was attempting a very polite way of gently suggesting an alternative, which was perhaps more in tune with "programmer speak" than "American English".

    In short... ++'s all around! :P
    --------------
    "But what of all those sweet words you spoke in private?"
    "Oh that's just what we call pillow talk, baby, that's all."
      The toughest part of any technology project is communicating. Communicating the original specifications can be excrusiating some times and communications among team members takes up much time to ensure that every idea has been effectively passed between team members.

      English is a wonderful language, it borrows from other languages whenever it feels like it. There is almost always more than one way (and often many) ways to say the same thing. It reminds me of a certain scripting language...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://445008]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2014-12-25 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls