openrefine


Google Refine split string into multiple columns using multiple separators


I am new to OpenRefine.
I would like to split a string such as the two examples below below into different columns.
EXAMPLE1: /articles/the_year_of_cooking_6_ways_to_make_2014_meals_your_best?affref=whatever
EXAMPLE2: /?Article=younger_looking_everything_5_tips_for_aging_well&affref=anotherwhatever
The first example should be divided into three columns:
/articles/
the year of cooking 6 ways to make 2014 meals your best?
affref=whatever
The second example should be divided into three columns:
/?Article=
younger looking everything in 5 tips for aging well
&affref=anotherwhatever
Edit Column>Split doesn't seem to allow for different separators ("/", "=", "&")
Edit Column > Add Column Based on This Column seems right but I don't know enough about regular expressions or GREL to make it happen.
Any help would be greatly appreciated.
Thanks.
You could use two separate Split operations with the different separate or you could learn enough about regular expressions to do it in one. Character classes are defined using square brackets, do using regular expression separator of [/?] or [/&?] should do the trick. I haven't tested this, so you may need to escape any characters that are considered special.

Related Links

How to export the cell that contains new line character properly?
Is it possible to run an OpenRefine script in the background?
Browser cluster link does not work properly in Open Refine
How to save only specific JSON elements in a new OpenRefine column
Openrefine: cross.cell for similar but not identical values
OpenRefine changing the port and host when executable is run directly
How can I join two datasets using a key in OpenRefine, with the secondary table having more than one value?
Open Refine: Open Project Issue
Progressive number in Openrefine column
Lost all my files on Openrefine [closed]
freebaseapps reconciliation stuck in Open Refine 2.6
OpenRefine - add sequence number, reset for each record
How to transpose cell data by section in Open Refine?
OpenRefine columnwise scripting
Remove content inside parentheses
Extra blank space between words

Categories

HOME
twitter
comparison
office365api
youtube-api-v3
upload
portia
applepay
awesome-wm
iggrid
windows-10-universal
qt-creator
size
percona
try-catch
foselasticabundle
openrefine
highlight.js
saxon
aurigma
samoa
crystal-reports-2008
introduction
reverse-proxy
mmap
rundeck
traffic
tooltipster
entitlements
msys2
madlib
skia
react-chartjs
directx-10
google-cloud-endpoints-v2
semantic-versioning
noraui
avcapturesession
subset-sum
abstract-class
bootstrapper
avro4s
apple-news
chain-builder
atomicity
react-scripts
jquery-validate
pebble-watch
tizen-native-app
gabor-filter
drupal-6
sqlclient
windows-iot-core-10
flutterwave
eventkit
httplistener
ado.net-entity-data-model
file-writing
autorest
qpid
websitepanel
lua-5.1
make-install
tform
rtbkit
qtableview
intel-fortran
cyclomatic-complexity
libressl
computer-algebra-systems
android-listview
ibaction
ideamart
arcanist
splash
nsight
ami
sortedlist
coldbox
angularjs-ng-click
codeigniter-routing
asp.net-web-api-odata
gulp-less
document-classification
sgen
reactfx
htmlcleaner
didselectrowatindexpath
balanced-payments
dexterity
tws
seed
interface-orientation
distutils
mt
php-parser
gnu-prolog
mod-auth
genshi
horizontal-accordion
android-sdk-2.1
floating
telerik-scheduler
dmx512
ext3
exchange-server-2003
simpletest
defensive-programming

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App