SlickEdit Community

SlickEdit Product Discussion => SlickEditĀ® => Slick-CĀ® Macro Programming => Topic started by: bercikr on May 20, 2008, 04:04:42 pm

Title: Performing a regex on a string without parse
Post by: bercikr on May 20, 2008, 04:04:42 pm
Hi,

    How do i perform a simple regex on a string without using parse? I am just trying to do something like this, but I don't want to modify the buffer I am working on really.

_str function_line = "Function fName1(param1:val1,param2,param3)";
_str strippedLine = replace(function_line, "<MYREGEX>", "UI");

    do i just have to modify the buffer and undo? I'd rather not do that if there is a better way.


Thanks,
Rob

Title: Re: Performing a regex on a string without parse
Post by: hs2 on May 20, 2008, 04:59:47 pm
You might use get_line() to retrieve the current line (p_line) as string and replace() etc. - HS2