Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8005789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:19:00+00:00 2026-06-04T17:19:00+00:00

I would like to parse the following bibtex string or maybe a whole .bib

  • 0

I would like to parse the following bibtex string or maybe a whole .bib file using php or javascript.

Any suggestions?

The string looks like:

@article{Sng:2010:PMW:1750585.1750678,
 author = {Sng, Colin T. S. and Manlove, David F.},
 title = {Popular matchings in the weighted capacitated house allocation problem},
 journal = {J. of Discrete Algorithms},
 issue_date = {June, 2010},
 volume = {8},
 number = {2},
 month = jun,
 year = {2010},
 issn = {1570-8667},
 pages = {102--116},
 numpages = {15},
 url = {http://dx.doi.org/10.1016/j.jda.2008.11.008},
 doi = {10.1016/j.jda.2008.11.008},
 acmid = {1750678},
 publisher = {Elsevier Science Publishers B. V.},
 address = {Amsterdam, The Netherlands, The Netherlands},
 keywords = {Maximum popular matching, Polynomial-time algorithm, Popular matching     problem, Priorities, Strict preference lists},
} 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T17:19:02+00:00Added an answer on June 4, 2026 at 5:19 pm

    I can’t quite remember the BibTeX syntax, but I’d suggest to convert the syntax to make it parsable by JSON.parse, like this:

    var bibjson = bibtex.replace(/(\w+)\s*=\s*\{/g,"\"$1\": \"")
              .replace(/\}(?=\s*[,\}])/g,"\"")
              .replace(/@(\w+)\s*\{([^,]*)/,"{\"$1\": \"$2\"");
    var bibobj = JSON.parse(bibjson);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to be able to parse the following data using PHP: $string
I would like to parse free-text time intervals like the following, using Python: 1
I would like to parse a mailer to-string which could consist of the following
I have a following string that I would like to parse into either a
I would like to parse following string to get the value 46.4400 INR <div
I would like to parse string literals using FParsec. By string literals I mean
Hi Guys I would like to parse the following xml string in C# i
I use JSON.NET and I would like to parse the following object which I
I would like to take a string representation of a set and parse it.
Hello I would like to use preg_match in PHP to parse the Desired text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.