Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #one# -> <element name="one">
  2. #two# -> <element name="two">
  3.  
  4. replaceAll("#[w]#", "<element name="[?1]"");
  5. // my hope is that I can remember a value somehow (`[w]`) and use it for the substitution ([?1])
  6. // which is, written like this, a nonsense
  7.  
  8. str = str.replaceAll("#(\w+)#", "<element name="$1">");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement