Regular Expression - please help .. URGENT !

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.
cmallelaAsked:
Who is Participating?
 
objectsCommented:
"////(<br>)*////"
0
 
cmallelaAuthor Commented:
please note that i want it in java in the function String.replaceAll(regex,string). thanks
0
 
CEHJCommented:
"////////<br>*////////"
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
CEHJCommented:
You were right first time - (sorry was thinking backslash)

"////<br>*////"
0
 
CEHJCommented:
You want to replace what by what?
0
 
CEHJCommented:
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
 
cmallelaAuthor Commented:
thanks everybody for very quick replies. i didnt realize that i didnt put the brackets (very dumb huh!)...
 
thanks so much.
0
 
objectsCommented:
(:
0
 
CEHJCommented:
>>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
 
cmallelaAuthor Commented:
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
 
CEHJCommented:
>>However, I wanted to split the points

Well you could have done, and in fact you can now still..!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.