RegEx needed for Wikipedia infobox

后端 未结 1 694
梦如初夏
梦如初夏 2021-01-03 09:04

OK, so here\'s what I need :

  • We have the full XML of a Wikipedia article
  • We need just the Infobox section

I have tried various things,

1条回答
  •  北海茫月
    2021-01-03 09:33

    Ok, I got it!

    Try this..:

    (?=\{Infobox)(\{([^{}]|(?1))*\})
    

    Here's the working example:

    http://regex101.com/r/kT1jF4

    0 讨论(0)
提交回复
热议问题