Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nanijoe
on Nov 30, 2009
|
parent
|
context
|
favorite
| on:
What are your Ruby Regex Idioms?
This (ruby) regex thing still gives me a headache , esp when I'm trying to figure out other people's code
carbon8
on Nov 30, 2009
|
prev
|
next
[–]
You can also use this as String#slice, which is a little clearer:
"foo@example.com".slice(/@(.*)/, 1)
sh1mmer
on Nov 30, 2009
|
prev
[–]
I love regex, but man it's still crazy voodoo. I hope those lines were well commented.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: