Re: GJS : How can I use Regex ( parse HTML ) ?

2019-06-22 Thread Emmanuele Bassi via javascript-list
You cannot parse HTML with regular expressions: https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 Ciao, Emmanuele. On Sat, 22 Jun 2019 at 06:30, Τάσος Λισγάρας via javascript-list < javascript-list@gnome.org> wrote: > Hello, > >

Re: GJS : How can I use Regex ( parse HTML ) ?

2019-06-22 Thread Tony Houghton
Gjs has standard javascript regexps built in, so you should be able to get all the info you need from MDN here and here . A

Re: GJS : How can I use Regex ( parse HTML ) ?

2019-06-22 Thread makepost
Hi, you can use the global RegExp from JavaScript standard library like in browser or Node, e.g. /(foobar)/g.exec(html). Alternatively, import some dedicated HTML parsing module from the npm registry as a dependency to your project using the https://github.com/cgjs/cgjs CommonJS shim. If you're pa