Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Regular Expression - please help .. URGENT !

Posted on 2004-10-29
12
Medium Priority
?
185 Views
Last Modified: 2010-03-31
dear experts,

can anybody give me the regular expression for "////<br>*////" (i.e., four forward slashes, followed by any number of <br>s and followed by four forward slashes). its urgent .. please help me as soon as possible. also, give me some links to know more about the regular expressions.

thanks in advance.
0
Comment
Question by:cmallela
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
  • +1
12 Comments
 

Author Comment

by:cmallela
ID: 12449610
please note that i want it in java in the function String.replaceAll(regex,string). thanks
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12449612
"////////<br>*////////"
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12449617
You were right first time - (sorry was thinking backslash)

"////<br>*////"
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 86

Expert Comment

by:CEHJ
ID: 12449622
You want to replace what by what?
0
 
LVL 3

Expert Comment

by:Gunt
ID: 12449624
0
 
LVL 92

Accepted Solution

by:
objects earned 150 total points
ID: 12449659
"////(<br>)*////"
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12449669
If you mean you want to surround the <br> tags with 4 forward slashes then try

s = s.replaceAll("(<br>+)", "////$1////");

General RE info:

http://java.sun.com/docs/books/tutorial/extra/regex/
0
 

Author Comment

by:cmallela
ID: 12450101
thanks everybody for very quick replies. i didnt realize that i didnt put the brackets (very dumb huh!)...
 
thanks so much.
0
 
LVL 92

Expert Comment

by:objects
ID: 12450345
(:
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12451285
>>please note that i want it in java in the function String.replaceAll(regex,string). thanks

cmallela, can you tell me how that accepted answer answers the question?
0
 

Author Comment

by:cmallela
ID: 12454206
well, my question was -

>> can anybody give me the REGULAR EXPRESSION for "////<br>*////" ,

However, I just mentioned that I want that particular regex in the function String.replaceAll .. but after all I wanted only the regex. However, I wanted to split the points but its such a easy question (in fact I was dumb), that I had to just select one answer and thus I selected that answer.

Sorry if that offended you but really appreciate your input on this.

Thanks.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12456230
>>However, I wanted to split the points

Well you could have done, and in fact you can now still..!
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question