Regex - finding words after a match string in found

tmajor99
tmajor99 used Ask the Experts™
on
Need help with regular expression to fin a words after a match string.   I need to find all the word after "KW".    For example;

Wiring Config
-------------------
54KW208V             --->  Need to find 208V
64kw
300KW c               ----->  Need to find  c
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT Guru
Most Valuable Expert 2011
Commented:
Try this:
/KW(.*)/

Open in new window

The value you want will be in the first captured group.
Shaun VermaakTechnical Specialist
Awarded 2017
Distinguished Expert 2018

Commented:
(?<=KW)(.*)

Open in new window

https://regexr.com/40rbm
Look-behind is unnecessary in this case.  Terry's solution is simpler and better for this case.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial