- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi I want to see if text values are correctly separated by a comma then space. However some values can start with SUPP__ and QNAM can contain a period (.) e.g. SUPPAE.START and QNAM.STOP.
For example these values are correctly arranged with a comma and single space:
SUBJID, SEQUENCE, SUPPAE.START, QNAM.STOP
SUBJID, START, SUPPCM.STOP
SUBJID, ID, QNAM.START
These are not correctly arranged and need to be detected:
SUBJID. SEQUENCE, SUPPAE.START. QNAM.STOP
SUBJID,START*SUPPCM.STOP
START; STOP;
START. STOP
I think we can use prxchange or similar prx funciton.
Thanks
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
In other words, detect a space preceded by something other than comma, or a comma without following space?
if prxmatch('/[^,] |,\S/', trim(VAR));
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
In other words, detect a space preceded by something other than comma, or a comma without following space?
if prxmatch('/[^,] |,\S/', trim(VAR));
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chris, the string can contain any characters potentially and its possible no space was used e.g. WORD1,WORD2 or WORD1.WORD2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
These 2 examples should be treated as expected:
The first is invalid, the second is valid.