RegEx Tool Help
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm having trouble using RegEx Tool to pick out codes from my text. Below is a sample of 2 text strings that I need to identify specific procedure codes from. The procedure codes are specific in this example but could be any procedure code that starts with a D and has 4 numbers after it.
ANALYSIS OF SALIVA SAMPLE FOR DIAGNOSTIC PURPOSES (D0418)
MAINTAINER D1550 AND REMOVAL OF FIXED SPACE MAINTAINERS
In this case I need to parse out D0418 on first line and D1550 on second line.
I thought something like this might work (\<[{D}]+,[\d{4}$]) and it runs without error but I don't actually parse out the procedure codes.
Any suggestions?
Thank you.
Solved! Go to Solution.
- Labels:
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @jokeffer
You can use the Parse method with the REGEX tool and apply this formula:
(D\d+)
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you and really that simple! Will that still work if there were multiple procedure codes say like D1550, D1551, D1552 in one of those statements?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
No, it wouldn't.
You would have to use the Tokenize function splitting to rows if you had multiple records within a line.
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Outstanding, I see how that works now. Thank you again!!!
