Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 7th, 2009, 03:39 PM
Authorized User
 
Join Date: Oct 2006
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need help with creating pattern in JAVA

Hi,

I am working with Pattern and Matcher in Java.
I need help searching for a particular pattern in the following strings (with expected results):

MY/BALL ---> MY/BALL
MY/BALL/B=XYZ ---> MY/BALL
MY-/BIG/WHITE/BALL=XYZ ---> MY-/BIG/WHITE
MY=/BIG/BROWN/B1*2=Y=XYZ ---> MY=/BIG/BROWN
MY=/BIG=/BROWN/BALL=XYZ ---> MY=

This is what I have for my pattern, "/B(.[^/])*=".

If the string has a pattern starting with "/B" and has its matching "=" (before next "/"), then strips the string starting at that pattern.

Please help.





Similar Threads
Thread Thread Starter Forum Replies Last Post
creating EXE in java satyabrata_majumder Java GUI 4 August 28th, 2013 06:44 AM
New help with Pattern in Java 2BOrNot2B Java Basics 1 July 1st, 2008 04:40 PM
Creating Setup file in Java pandian Java Basics 11 June 20th, 2007 10:30 AM
Creating Windows Service in Java pandian Java Basics 1 October 23rd, 2006 05:34 PM
DirectoryInfo.GetFiles(pattern): search pattern fo arif_1947 VS.NET 2002/2003 1 October 19th, 2004 11:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.