Hi Jeremy,
Thank you for reaching out. As you pointed out, there is no direct way to use regular expressions in the initial search queries. You may have to use a combination of searches and post-processing.
There's an R package for querying Europe PMC, available
here. As detailed on the
Europe PMC RESTful Web Service page, you can search by sections in the full text and retrieve results as ID lists. You can also retrieve full text XMLs given the PMC ID.
And here's one of the approaches you can try using the R package:
1. Retrieve Article IDs with "three" in the Methods Section using epmc_search:
epmc_search(query = 'METHODS:"three"', limit = 10, output = "id_list")
There are millions of results, but can just limit to smaller for testing.
'id_list' returns a list of IDs and sources
2. For the retrieved ids, you can then get the full text in XML format using epmc_ftxt.
full_text <- epmc_ftxt(pmcid)
3. And then, extract the Methods section from the XML and apply a regular expression as needed.
It will also be useful to look at the available full text fields that can be used for search from our
search syntax page.
Hope you find this useful. Let us know if you have further queries.
Kind regards,
Madhumiethaa