Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Regex Exercises 2

Regular expressions do not have to be written as Java strings (eg, no Java string escape for the '\').

Tutorial Details:

You want to scan a Java source program and print all the subscripts that follow the variable a. The subscript text between the square brackets should be put into group 1. For subject "xa[1] = a[2] + a[3];", group 1 will be "2" on the first match, and "3" on the second. You will have to be very careful with escaping some regular expression characters, because [ and ] have special meanings in regular expressions.


 

Rate Tutorial:
http://www.roseindia.net/java/java-tips/data/strings/40regular_expressions/q-regex-2.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Regex Exercises 2

View Tutorial:
Regex Exercises 2

Related Tutorials:

Speed up listener notification - JavaWorld February 2000
Speed up listener notification - JavaWorld February 2000
 
JNDI overview, Part 2: An introduction to directory services - JavaWorld February 2000
JNDI overview, Part 2: An introduction to directory services - JavaWorld February 2000
 
Use XML data binding to do your laundry
Use XML data binding to do your laundry
 
Study guide Achieve strong performance with threads Part 1
Study guide Achieve strong performance with threads Part 1
 
Is WSDL the indispensable API?
Is WSDL the indispensable API?
 
Test networked code the easy way
Test networked code the easy way
 
JDBC scripting, Part 2
JDBC scripting, Part 2 Programming and Java scripting in JudoScript Summary JudoScript is a rich functional scripting language, and an easy and powerful general programming and Java scripting language. JudoScript's power comes from its synergy of
 
Classifier4J
Classifier4J is a Java library designed to do text classification. It comes with an implementation of a Bayesian classifier, and now has some other features, including a text summary facility.
 
A well-behaved Jetspeed portlet
This article presents a working example of how to construct a Jetspeed portlet that runs efficiently, adheres to the Model 2 architecture, and, by not interfering with additional portlets, plays well with others. In addition, I demonstrate some simple way
 
Network Programming with JavaTM 2 Platform, Standard Edition 1.4 (J2SETM)
This article provides an overview of the new features and enhancements in the Java 2 Platform, Standard Edition 1.4 (J2SE), and shows you how to use them effectively.
 
JSP Tutorial
This Tutorial is for beginners in the Java Server Pages Technology
 
Tiger and Beyond, the Future of the Java Platform
Part Two of an interview with Sun Microsystems' Sun Fellow, Graham Hamilton, explores Java 2 Platform, Standard Edition 5.0 (J2SE 5.0) and the future of the Java language.
 
Sun Repricing Select Sun StorEdge 3000 Arrays
To provide customers with affordable storage products, Sun is reducing its price on the Sun StorEdge 3310 SCSI Array, Sun StorEdge 3510 FC Array, and Sun StorEdge 3511 FC Array with SATA.
 
Updates to the Survey of J2ME Today
Give a consolidated big picture survey of J2ME terminology and technical origins.
 
Five Reasons to Move to the J2SE 5 Platform
Five important reasons to move to the Java 2 Platform, Standard Edition (J2SE platform) 5.0, supported by data and references to prove that the 5.0 release will reduce development and runtime costs.
 
We are providing Fedora Cord 2 Linux CD's .
We are providing Fedora Cord 2 Linux CD's . Fedora Core 2 Linux Now Available Fedora Cord2 CD's We are providing the free downloadable version of Fedora Core 2 CDs, which is distributed under GNU public license. Fedora is the latest version of
 
Buy Slackware 10.0 in India from us. Slackware 10.0 is available with us.
Buy Slackware 10.0 in India from us. Slackware 10.0 is available with us. Slackware 10 Linux Now Available Linux Slackware 10 CD's Slackware 10.0 contains the GNOME 2.6.1 (including a collection of pre-compiled GNOME applications), and KDE 3.2.3,
 
We are providing Downloadable Version of Slackware 9.1 Linux CD's.
We are providing Downloadable Version of Slackware 9.1 Linux CD's. Slackware 9.1 Linux Now Available Linux Slackware 9.1 CD's We are distributing the free downloadable version of Slackware 9.1 Linux, which is distributed under GNU public license.
 
NetBeans IDE 4.1
Out-of-the-box support for J2EE 1.4 and Web Services. Check out what early access release 2 can do for you!
 
Updated Hardware Certification Test Suite Available for Download
Version 2.4 of the HCTS is now available. Use it to certify your hardware on the Solaris 9 Operating System (and updates) and the Solaris 10 OS, 32-bit and 64-bit environments.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.