Note that there are some explanatory texts on larger screens.

plurals
  1. POBibtex php preg_match_all
    primarykey
    data
    text
    <p>I have a text file with a Bibtex export. The text file has a number of entries following the pattern below.</p> <pre><code>@article{ls_leimeister, added-at = {2013-01-18T11:14:11.000+0100}, author = {Wegener, R. and Leimeister, J. M.}, biburl = {http://www.bibsonomy.org/bibtex/27bb26b4b4858439f81aa0ec777944ac5/ls_leimeister}, journal = {International Journal of Technology Enhanced Learning (to appear)}, keywords = {Challenges Communities: Factors Learning Success VirtualCommunity and itegpub pub_jml pub_rwe}, note = {JML_390}, title = {Virtual Learning Communities: Success Factors and Challenges}, year = 2013 } </code></pre> <p>I want to use php and considered preg_match_all</p> <p>The following didnt get me anywhere:</p> <pre><code>preg_match_all('/@^.*}$/', file_get_contents($file_path),$results); </code></pre> <p>I wanted to start simple, but that didnt really work. I am kinda new to php RegEx.</p> <p>The perfect final output would be:</p> <pre><code>Array ( [0] =&gt; Array ( ['type'] =&gt; article ['unique_name'] =&gt; ls_leimeister ['added-at'] =&gt; 2013-01-18T11:14:11.000+0100 ['author'] =&gt; Wegener, R. and Leimeister, J. M. ['biburl'] =&gt; http://www.bibsonomy.org/bibtex/27bb26b4b4858439f81aa0ec777944ac5/ls_leimeister ['journal'] =&gt; International Journal of Technology Enhanced Learning (to appear) ['keywords'] =&gt; Challenges Communities: Factors Learning Success VirtualCommunity and itegpub pub_jml pub_rwe ['note'] =&gt; JML_390 ['title'] =&gt; Virtual Learning Communities: Success Factors and Challenges ['year'] =&gt; 2013 ) [1] =&gt; Array ( [...] =&gt; … ) ) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload