Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8894237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:26:43+00:00 2026-06-14T23:26:43+00:00

i am working with Google Refine right now. My goal is to split a

  • 0

i am working with Google Refine right now. My goal is to split a single, existing column into two parts. I am using the built in “add column based on…“-function. The column contains a street name and the coressponding house number. For example, I’ve got this:

Stackoverflow Street 89

Every row is structured in the same way, which means that a streetname can be long or short, can contain one or more words, but it always ends with a (house) number and its always separated by a blank space.

As I am working with Google Refine, i was about to do this by using GREL statements (Google Refine Expression Language). The idea is like that: Split every value divided by a blank space into pieces. Save each split value in a variable. Then check if the specific values contains a numeric value (which is the house number). If it is a numeric value, take that value and forward it to the output. I already got something like this.

forEach(value.split(" "), v, v).join(";")

Here is the question: How do i integrate an IF function within the forEach function? If i would know how to do it, i would probably be able to not only split the values, but also check if its numeric. To check if it is numeric, one can use isNumeric(value).

I appreciate every hint. Thanks, Jörg.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:26:45+00:00Added an answer on June 14, 2026 at 11:26 pm

    If all the constraints that you describe hold true (it’s always the last piece and always exists), I’d just use value.split('')[-1]

    In answer to the direct question that you asked, in case someone else finds this in search, your expression so far is equivalent to:

    value.split(" ").join(";")
    

    ie the forEach isn’t doing anything. To integrate the if(), use it as part of the expression which forms the 3rd parameter to forEach

    forEach(value.split(" "), v, if(isNumeric(v),null,v)).join(";")
    

    I’m not sure what output format you’re trying to achieve, but this will give you a semi-colon separated list of all non-numeric words in your cell value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started working using Google Maps API yesterday, and trying to set up
I am working with google app engine and using the low leval java api
I've been working with Google App Engine and I'm running into some slow performance
ASP.Net FileUpload not working in google chrome.It shows validation error,even after choosing right file
I've just started working with Google's CTS and ran into a script that had
I'm using GWT (currenly working with google's eclipse plugin), and I'm trying to throw
I've been trying to get ActionBarSherlock working with Google's fragment tutorial and run into
I'm using google-api-ruby-client for working with Google Calendar API v3. The only problem I'm
I'm trying to get tipfy working on Google App Engine (GAE). I'm using Windows
I created a working Google Channel AP and now I would like to send

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.