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.
Perl の文字列から前の単語を取得するシナリオがあります。例えば
$str = "there are lot of apples <xref id=1> and " . "a lot of oranges <xref id=2> as blah blah";
それぞれの前に前の単語 (上記の「りんご」と「オレンジ」) を取得する必要があります<xref(.*?)>
<xref(.*?)>