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

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
forNonBlank function in OpenRefine
Import columns to existing OpenRefine project
Bulk replace text in all columns
Split multi valued cells in more than one column into rows (Open Refine)
OpenRefine - Fill between cells but not at the end of the list
Reconciliation services for OpenRefine not working?
Appending a specific string in GREL

Categories

HOME
winforms
listview
openstack
single-sign-on
json.net
include
stock
onedrive
at-command
filtering
malloc
electronics
jxls
baqend
windows-server
yum
pivotal-cloud-foundry
opengl-es-2.0
podio
contact
ssl-client-authentication
task
phaser
quickfix
serverless-framework
sms-gateway
oxyplot
google-cloud-speech
nodatime
object-detection
cx-freeze
opencover
sox
chromium-embedded
pingfederate
windows-error-reporting
ejabberd-module
procdump
javascriptcore
iframe-resizer
bosh
.net-4.0
pdb
catel
code-contracts
framemaker
commit
sequential
overriding
bower-install
abstract-class
code-search-engine
g-code
quadratic-programming
spring-security-kerberos
.net-4.6.2
zip4j
prolog-setof
jlink
alphabet
domain-model
hls.js
fancybox-2
jxcore
nbconvert
spring-cache
query-performance
crosswalk-runtime
time-and-attendance
jquery-filter
instant
trash
pcf
xml-attribute
pickadate
captivenetwork
xpath-1.0
separator
cartesian-product
lemon
eclipse-clp
ibaction
myo
createprocessasuser
bridge.net
npapi
android-imagebutton
codeigniter-routing
code-access-security
transcoding
cloud-connect
typo3-neos
stxxl
industrial
prettify
quantlib-swig
excel-2003
jplaton
html4
smtp-auth
chuck
php-parser
yui-datatable
jmock
lang
sudzc
paster
sortable-tables
dbal
perfect-hash
adrotator
zend-decorators
genealogy
post-build

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App