/jEdit/tags/jedit-3-2-2/org/gjt/sp/jedit/tips/tip34.html

# · HTML · 19 lines · 14 code · 5 blank · 0 comment · 0 complexity · 118399370e8badf525f384c3fb32160c MD5 · raw file

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