Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Regex evaluation step - regexp as a variable

  1. #1

    Question Regex evaluation step - regexp as a variable

    Hi!

    I'm developing a job, with several transformations. The purpose of first transformation is to extract timestamp from input filename - let's name it "extract_ts". Because I have several types of files, and each of them contains a timestamp, I want the extract_ts transformation to have regex as a parameter so I can change it for different kind of files.

    Inside of the extract_ts I have Regex evaluation step where I insert the regular expression. It works well if I put actual regexp text there - like ^.*$. But if I put a parameter name - ${p_regexp} instead - it blames for incorrect regular expression. There is a $-sign in a diamond for this input so I guess there is a way to do what i want.

    You help is appreciated!
    Thank you!

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Don't forget to enable variable substitution.


    Name:  re.png
Views: 190
Size:  7.7 KB
    So long, and thanks for all the fish.

  3. #3

    Default

    Quote Originally Posted by marabu View Post
    Don't forget to enable variable substitution.
    This is what i missed! Thank you so much!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.