Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 Ruby 获取字符串的一部分?我想image/jpeg从此字符串中获取值:
image/jpeg
"Content-Disposition: form-data; name='arquivo'; filename='the_last_in_line.jpg' Content-Type: image/jpeg"
你试过什么?您可以对此类任务使用正则表达式:
str='Content-Disposition: form-data; name="arquivo"; filename="the_last_in_line.jpg" Content-Type: image/jpeg' str[/Content-Type:\s*(\S*)/,1] # => "image/jpeg"
嗨,我有一个命令链接,所以当单击它时,当字段集 处于相同状态时,我将渲染action="#{projectAdminisrationMB.showGroups(userObj)}"一个字段集,但当我将它放在单独的 ui:define 中时,它将不会被渲染。<p:fieldset legend="Manage User Groups" id="manage
action="#{projectAdminisrationMB.showGroups(userObj)}"
<p:fieldset legend="Manage User Groups" id="manage