Jump to content
UBot Underground

Recommended Posts

Hello,

 

I am not sure if this has been discussed here on the forum. Please let me know of it is.

 

This is a text that I found on a webpage => 617-8 Avenue SW, Calgary, AB T2P1H1

 

The first is address then City then Post Code.

 

How can I scrape each text separated by comma using regex?

 

So I can get in separate:

617-8 Avenue SW

Calgary

AB T2P1H1

 

Apprecited for any feedback.

 

Thanks

Sol

  • Like 1
Link to post
Share on other sites

Hi Sol,

 

If you know they will always be separated by a comma I think the best route to take is to split them into a list separated by a comma.

set(#address, "617-8 Avenue SW, Calgary, AB T2P1H1", "Global")
clear list(%address)
add list to list(%address, $list from text(#address, ","), "Delete", "Global")

When you go to use each list item make sure you use the $trim function to get rid of any leading or trailing spaces.

 

Regex is great, but in this case I don't think it is necessary!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...