Wednesday, 15 February 2012

Using groups in OpenRefine regex -



Using groups in OpenRefine regex -

i'm wondering if possible utilize "groups" in regex used in open refine grel syntax. mean, i'd replace dots followed , preceded character same character , dot followed space , character.

something like:

s.replace(/(.{1})\..({1})/,/(1).\s(2)/)

i think found out how deal this. need set $x in string value address xth capture group.

it should this:

s.replace(/.?(#capcure grouping 1).?(#capcure grouping 2).*?/), " text $1 text $2 text")

openrefine

No comments:

Post a Comment