in reply to Match a comma between two words
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Match a comma between two words
by davido (Cardinal) on Jul 03, 2014 at 00:13 UTC | |
Dave | [reply] [d/l] [select] |
|
Re^2: Match a comma between two words
by AnomalousMonk (Archbishop) on Jul 02, 2014 at 22:32 UTC | |
Reading over the replies given so far, none seemed 'insulting' or in any way intentionally offensive; indeed, they seemed to be quite thoughtful and carefully composed. In any event, here are exact answers to your questions. I hope they will be helpful. You must of course define $word as appropriate to your application. (Requires Perl version 5.10+ for the \K regex construct.)
Update: Changed example code to loop over @ARGV for test strings. | [reply] [d/l] [select] |
|
Re^2: Match a comma between two words
by Tux (Canon) on Jul 03, 2014 at 10:48 UTC | |
Enjoy and behave Enjoy, Have FUN! H.Merijn | [reply] |
|
Re^2: Match a comma between two words
by BillKSmith (Monsignor) on Jul 03, 2014 at 11:46 UTC | |
Bill
| [reply] |
|
Re^2: Match a comma between two words
by Laurent_R (Canon) on Jul 03, 2014 at 23:15 UTC | |
Item 2: nobody said that you are stupid, nobody insulted you. Really. But you are sort of insulting people who tried to help you when you call ramble what they said. Same answer with respect to your last comment: Many thanks to those who will actually answer my questions without insulting me! Nobody insulted you. Or, if someone did, then I must be too stupid to see where, please show me where. At least 3 persons, including myself, tried to provide code snippets that tried to answer your questions without using a module before you posted your "pissed-off" post. But your questions were not very clear as to what you need exactly, and even your new post still does not really clarify what you need exactly: OK, you want to match comma(s), but what do you want to do with matched commas? Not clear to me. Usually, in a CSV, you are really interested with what if between the commas, the commas are just separators for the relevant information. I offered a solution based on this assumption. Is this not what you need? Well then clarify what you need and tell me why my proposed solution does not match your expectation. But don't say that I am ranting, don't say that I am insulting you, and don't say that monks here did not try to give you solutions. | [reply] |