/jEdit/tags/jedit-4-2-pre3/doc/tips/tip34.html

# · HTML · 22 lines · 15 code · 7 blank · 0 comment · 0 complexity · 0484073f48dcc05caad5e6be3cbccf77 MD5 · raw file

  1. <html><body>
  2. You can replace all occurrences of a specific string or regular
  3. expression with the return value of a BeanShell script if the
  4. <b>Return value of a BeanShell
  5. snippet</b> radio button is selected in the search dialog box.<p>
  6. You can use
  7. this, for example, to convert all tags in an HTML file to lower case, by
  8. searching for the following regular expression:
  9. <p>
  10. <code>&lt;(.+?)&gt;</code>
  11. <p>
  12. And entering the following in the replace text field:
  13. <p>
  14. <code>"&lt;" + _1.toLowerCase() + "&gt;"</code>
  15. </body></html>