次の文字列があります。
x = %q{ On the server side, my EJB3 application uses Spring for configuring all sorts of things. So my EJBs all look up various ApplicationContexts and use them as a sort of...well, I was going to say poor man's JNDI, but the reality is that JNDI in the J2EE environment is really a poor man's Spring. :-)
On the GUI side, I use it instead of resource injection to get access to my EJBs. That lets me test the GUI component with simple pojos. So ejb is very good technology}
"ejb"
大文字と小文字を区別しない文字列を置き換えています。私はこれをやっています:
y = x.gsub(/(ejb)/i, '<em>EJB</em>')
# => " On the server side, my <em>EJB</em>3 application uses Spring for configuring all sorts of things. So my <em>EJB</em>s all look up various ApplicationContexts and use them as a sort of...well, I was going to say poor man's JNDI, but the reality is that JNDI in the J2EE environment is really a poor man's Spring. :-)\n\nOn the GUI side, I use it instead of resource injection to get access to my <em>EJB</em>s. That lets me test the GUI component with simple pojos. So <em>EJB</em> is very good technology"
小文字の一致があります: "ejb"
、これに置き換えています: "<em>EJB</em>"
。ケースを交換せずに交換するにはどうすればよいですか?欲しい"<em>ejb</em>"
。