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.
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