Service Virtualization

Expand all | Collapse all

Is it possible to use patterns (built-in string generator) with beanshell ?

  • 1.  Is it possible to use patterns (built-in string generator) with beanshell ?

    Posted Jul 25, 2018 07:55 AM

    Hi All,

     

    Is it possible to use patterns (built-in string generator) with beanshell ? And how ?

     

    Benoit



  • 2.  Re: Is it possible to use patterns (built-in string generator) with beanshell ?
    Best Answer

    Posted Jul 25, 2018 08:52 AM

    Hi Benoit, try this as Beanshell in a JSR-223.

    String pat = "{{=[:Email:]}}";
    String val = testExec.parseInState( pat );

    return val;



  • 3.  Re: Is it possible to use patterns (built-in string generator) with beanshell ?

    Posted Jul 25, 2018 08:58 AM

    Thanks Joel, it does work.