RegEx Tutorial?

  • Thread starter Siddarth Chandrasekaran
  • Start date
S

Siddarth Chandrasekaran

I looked through the archives, but couldn't find a comprehensive
tutorial on regular expressions -- could someone please point me to
one?

Specifically, I'm looking to extract all the words from a string that
are capitalized, but can't find case-based match operators.

Thanks,

Siddarth
 
E

Ehsanul Hoque

To test regular expressions (and with a handy little regex reference at the=
bottom)=2C use rubular: http://rubular.com/
And for your particular issue=2C try this:
str =3D "this Is Some test String eh?" cap_words =3D str.scan(/[A-Z]\w+/=
)

- Ehsan
Date: Thu=2C 17 Jun 2010 13:34:36 +0900
From: (e-mail address removed)
Subject: RegEx Tutorial?
To: (e-mail address removed)
=20
I looked through the archives=2C but couldn't find a comprehensive
tutorial on regular expressions -- could someone please point me to
one?
=20
Specifically=2C I'm looking to extract all the words from a string that
are capitalized=2C but can't find case-based match operators.
=20
Thanks=2C
=20
Siddarth
=20
=20
_________________________________________________________________
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with H=
otmail.=20
http://www.windowslive.com/campaign/thenewbusy?tile=3Dmulticalendar&ocid=3D=
PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5=
 
J

Josh Cheek

[Note: parts of this message were removed to make it a legal post.]

On Thu, Jun 17, 2010 at 12:42 AM, Siddarth Chandrasekaran <
Got it, thanks!

Siddarth
Sounds like you are using the proposed regex. Why don't you go to the given
site (rubular), put in "javaVariable", and see if it gives you what you
expect.

If not, here is a decent explanation of the different things you could do to
match. http://www.zenspider.com/Languages/Ruby/QuickRef.html#11
 
R

Robert Klemme

I looked through the archives, but couldn't find a comprehensive
tutorial on regular expressions -- could someone please point me to
one?

Not exactly a tutorial but a very comprehensive book on the matter is
"Mastering regular expressions".

Kind regards

robert
 
C

chris williams

This one gives a good overview and samplehttp://rubylearning.com/satishtali=
m/ruby_regular_expressions.html
This one provides a list of common expressionshttp://www.rubyist.net/~slage=
ll/ruby/regexp.html
Here is a tester for your ruby regular expressions.http://rubular.com/
Hope this helps
chris williams
Date: Thu=2C 17 Jun 2010 13:34:36 +0900
From: (e-mail address removed)
Subject: RegEx Tutorial?
To: (e-mail address removed)
=20
I looked through the archives=2C but couldn't find a comprehensive
tutorial on regular expressions -- could someone please point me to
one?
=20
Specifically=2C I'm looking to extract all the words from a string that
are capitalized=2C but can't find case-based match operators.
=20
Thanks=2C
=20
Siddarth
=20
=20
_________________________________________________________________
Learn more ways to connect with your buddies now
http://go.microsoft.com/?linkid=3D9734388=
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
474,149
Messages
2,570,841
Members
47,388
Latest member
EarthaGilm

Latest Threads

Top