Link to home
Start Free TrialLog in
Avatar of jay_waugh
jay_waughFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Can Regex be used to identify a column in a string?

I have a situation where I need to be able to always highlight 3rd section or column of a string. Can anyone suggest the appropriate syntax?

For example in the below strings bird would be highlighted.

dog asds-sds-assa bird y

dinosaur nkj-as bird
Avatar of Rgonzo1971
Rgonzo1971

Hi,

pls try
([\S]*\s){2}([^\s]*)

Open in new window

REgards
Avatar of jay_waugh

ASKER

Thanks, with that code I am returned two matches, the second being what I am after. Can it be revised so that only the second match is returned?
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial