6 Replies Latest reply: Nov 2, 2012 5:33 AM by Kayaman RSS

    how to create a regex to match a certain pattern for string abc*def*

      I have a requirement in which i have a string like abc*def* and i want to remove * from this string and also i want to remove a character before * and after *.
      So, if i have string abc*def* then i want the result as abe.

      Can you please let me know what regex i can use in String.replaceAll method ? I can do it with using for loop as well but i think using replaceAll will be much cleaner.