Re: I resolve to finally grok and use the regex option...
by cog (Parson) on Apr 23, 2005 at 11:36 UTC
|
| [reply] |
|
Yeah, but if you take away all the ones that are going away in Perl 6, all you're left with is "ig", which can only be construed as the country code for "Iguana". (Unless it's "gi", which is the code for Gilligan's Island. Hmm, that would explain a lot about Perl 6...)
| [reply] |
|
You can spell "sexgismo" with them too. Not that you'd want to...
_____________________________________________________
Jeff japhy Pinyan,
P.L., P.M., P.O.D, X.S.:
Perl,
regex,
and perl
hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart
| [reply] |
|
| [reply] |
|
|
| [reply] |
|
| [reply] |
|
Schiiuuuu... keep it down, they might hear you O:-)
| [reply] |
Re: I resolve to finally grok and use the regex option...
by ambrus (Abbot) on Apr 23, 2005 at 09:22 UTC
|
I routinely use g, s, and sometimes even i, e, x, c.
I even know what o and m means, but I haven't find any use for them.
However, I am all confused when I write regexen in ruby, because the m option for ruby regexps is the same as the s in perl.
Even worse, if you write s by habit, you don't even get a warning because it has a different meaning.
Update 2007 jan 22: since then, I've found a use for m as well.
| [reply] |
|
You might not use them because there are other ways to get around them. For instance, with qr//, you don't need to ever use m//o. m//m can be useful when you're trying to read in data records, but you can also match on the line seperator with a lookahead or lookbehind assertion. (or line seperator or \A or \Z, it you might match the very beginning or very end)
| [reply] [d/l] [select] |
|
| [reply] [d/l] |
|
This was new to me too. I found some additional information on /c in perlretut.
| [reply] |
|
/c (in conjunction with /g) is great for tokenization. See Using Multiple m/\G.../gc to Tokenize for an example. There's another example in perlfaq.
I've actually used all of the options listed in the poll.
| [reply] |
Re: I resolve to finally grok and use the regex option...
by japhy (Canon) on Apr 23, 2005 at 09:37 UTC
|
Finally? You don't know me very well.
_____________________________________________________
Jeff japhy Pinyan,
P.L., P.M., P.O.D, X.S.:
Perl,
regex,
and perl
hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart
| [reply] |
Re: I resolve to finally grok and use the regex option...
by bageler (Hermit) on Apr 27, 2005 at 01:58 UTC
|
mexicogs: third world folk workin for the man. | [reply] |
Re: I resolve to finally grok and use the regex option...
by ambs (Pilgrim) on Apr 24, 2005 at 14:03 UTC
|
| [reply] [d/l] |
Re: I resolve to finally grok and use the regex option...
by wolfger (Deacon) on Apr 24, 2005 at 21:29 UTC
|
What about /. ?
--
Linux, sci-fi, and Nat Torkington, all at Penguicon 3.0
perl -e 'print(map(chr,(0x4a,0x41,0x50,0x48,0xa)))'
| [reply] [d/l] |
|
Nobody who groks /. uses it. They avoid it.
| [reply] |
Re: I resolve to finally grok and use the regex option...
by deprecated (Priest) on Apr 27, 2005 at 02:03 UTC
|
There should be a damn /ee option to this poll.
| [reply] |