SOLVED
Help in Regex Expression
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
James89
7 - Meteor
‎09-11-2024
03:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I am trying to split a string with the following format into 8 separate columns.
TEAM||Manchester|London||City|Derby|Number of Players|Man of the Match|Match Day
I have tried using Regex expression ([^|]*) as suggested doesn't work out that way. Any tips that could help solve this issue?
Thanks!
Solved! Go to Solution.
Labels:
- Labels:
- Regex
4 REPLIES 4
Deano478
12 - Quasar
‎09-11-2024
03:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hey @James89 this could be neater but this will do it for you
([^|]+)\|\|([^|]+)\|([^|]+)\|\|([^|]+)\|([^|]+)\|([^|]+)\|([^|]+)\|([^|]+)
OTrieger
13 - Pulsar
‎09-11-2024
03:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@James89
It can be done also with the use of Text To Column tool, Using Pipe as the delimiter.
17 - Castor
‎09-11-2024
03:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @James89, the following ought to work in the RegEx tool in Tokenize mode, splitting to 8 fields:
([^|]+)\|?
‎09-11-2024
06:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks @DataNath ! It really works.
