Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Regular expression

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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

 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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.
 
Marshal
Posts: 79969
396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
The Java™ Tutorials section is a good introduction to regular expressions.
 
author
Posts: 23958
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Duplicate topic... please continue on your other topic.

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


Henry
 
He repaced his skull with glass. So you can see his brain. Kinda like this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
    Bookmark Topic Watch Topic
  • New Topic