This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Regular expression Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Regular expression

keshav reddy
Greenhorn

Joined: May 11, 2007
Posts: 13
Hi Ranchers,

Can you please help me in writting the regular expressions for the following requirements:

1. Input string : "1a23MyFunc(ab)0123MyFunc(1234)000"

Need to split the string with: MyFunc(anyvalue)

Required output is (string array): 1a23,0123,000


2. InputString : "abcMyFunc(ab)xyzMyFunc(1234)000"

Required output is (value passed to MyFunc method) : ab, 1234


let me know if anything is not clear.

thanks for your help,
Keshav

Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2258
    
    3

Howdy, Keshav!

Champion, this forum is dedicated to people who passed an exam and want to share their happiness/experience with the other ranchers, so we can congratulate them and discuss about the whole thing. Please choose carefully the appropriate forum before posting a question, so we keep everything in their places, and people with the same problem can find the solution faster. For instance, I'd say that this question of yours would be better addressed in the Java in General forum or in the SCJP forum, where people are studying to achieve this certification.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38100
    
  22
The Java™ Tutorials section is a good introduction to regular expressions.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18550
    
  40

Duplicate topic... please continue on your other topic.

http://www.coderanch.com/t/476225/Programmer-Certification-SCJP/certification/Regular-expression


Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
wood burning stoves
 
subject: Regular expression
 
Similar Threads
To find a largest sector in a given input string of 1's and 0's
How to Pass arguements in errors.rejectValue()
s.compareTo()
Regular expression
using regular expression Problem