Page 1 of 1

Can we use regular expression in DataStage job??

Posted: Wed Nov 05, 2008 1:07 am
by sandeep8.s
Hi
I have to match some text pattern in a data. Is it possible to use regular expression in Data Stage parallel job?

Posted: Wed Nov 05, 2008 2:59 am
by ArndW
No in the job, but you can always shell out to the OS and use regular expressions and functions there.

Posted: Wed Nov 05, 2008 7:11 am
by ray.wurlod
Filter stage has limited regexp capability.

Posted: Wed Nov 05, 2008 8:24 pm
by jhmckeever
You could add your own regular expression support using the C-source I posted <b><a href="viewtopic.php?t=107882">Here</a></b>.

(Although I'm beginning to wonder why I bothered, as nobody seems to like using <b><a href="search.php">Search </a></b> much these days)

J.

Posted: Tue Nov 18, 2008 6:51 pm
by Nagaraj
Ray can you please give an example here? thanks

Posted: Tue Nov 18, 2008 8:30 pm
by ray.wurlod
The WHERE clause can use the LIKE operator followed by a regular expression. This is documented early in the chapter on the Filter stage in the Parallel Job Developers Guide manual.