/jEdit/tags/jedit-4-2-pre4/doc/tips/tip99.html

# · HTML · 15 lines · 9 code · 6 blank · 0 comment · 0 complexity · b83340baaefc405b888cfe3af7bf17ff MD5 · raw file

  1. <html><body>
  2. You can change numbers from decimal to hexadecimal (or any other base for that matter) using the search and replace feature.<p>
  3. First select the number(s) to convert, and make sure <b>Search in selection</b> is selected in the search dialog box. Then
  4. search for the following regular expression:<p>
  5. <code>.*</code><p>
  6. And replace it with the following BeanShell snippet:<p>
  7. <code>Integer.toString(Integer.parseInt(_0),16)</code>
  8. </body>
  9. </html>