Problem creating a column using value.match() with OpenRefine

Hi:

I’m completely new with OpenRefine and I’m using v3.2 to upload a little dataset listing the new public domain Spanish authors published by the Spanish National Library. My present task is extract some codes (ISNI, VIAF and BNE) set in a common field into individual columns for matching with Wikidata. I found I can extract the correct value (removing the URL) with this GREL expression:

value.match(/.*isni\/(\d+).*/)

The screenshot will explain better.

To my surprise this expression finally doesn’t work o_0

What I’m doing wrong? Thanks in advance.

2 Likes

@SGill, @jhsoby-WMNO any ideas on this?

Finally I got the solution from @Lucas_WMDE at #Wikidata IRC channel. I just need to add [0] to the query:

value.match(/.*isni\/(\d+).*/)[0]

And now it works like a charm.

Thanks all!

3 Likes