Home Answers Viewqa Java-Beginners Regular Expression Help Help HELP!!!!

 
 


harish
Regular Expression Help Help HELP!!!!
0 Answer(s)      2 years and 5 months ago
Posted in : Java Beginners

HI all

I am very new to java, but i have this problem i got a string e.g

Courses['07001'].Title = "International Students 1";

So i need to extract only the "international Students", i did that by using this expression String regex = "Courses\[\'[^\']+\'\]\.Title *= *\"([^\"]+)\";";

But the problem now is, say i got string like

Courses['07001'].CO = new Array("MR","","Harish Ram","Not Available","M.R Harish","hotmail.com");

so i need to extract"07001", "MR Harish Ram " and extract "M.RHarish @ hotmail.com" note that i need to add the @ when compiling. got any ideas if you could help me to give a solution of how to retrieve the name and email add seperately...

So my final output should look in the form given below and including the quotes

""07001", "MR Harish Ram","M.RHarish @ hotmail.com""

Help is greatly appreciated

Thanks in advance!!!!!

Please Help!!

harish

View Answers









Related Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.