Using regular expressions in DicomEdit

26 views
Skip to first unread message

Mario Uhland

unread,
Dec 4, 2019, 3:41:01 AM12/4/19
to DicomBrowser users
Hi,

I am using DicomBrowser-1.7.0b5-bin-with-dependencies.jar and would like to apply a DicomEdit script containing a conditional statement with a regular expression.

I am trying to replicate an example from the DicomEdit Language Reference page with the following code:
(0020,0011) ~ "\d\d" ? (0008,1030) := "Two digit study"

My series number (0020,0011) is 28, so it should match the regular expression "\d\d". If I run the script, I get the following error message:
"Error in script: can't look backwards more than one token in this stream"

If I use the script with the series number instead of a regular expression
((0020,0011) ~ 28 ? (0008,1030) := "Two digit study"), it is executed properly.

As I am quite new to DicomBrowser I would be happy about any advice.

Kind regards, Mario Uhland
Reply all
Reply to author
Forward
0 new messages