Twistpad Carthago Software forums / Twistpad /  

 Find/Replace issue with regex

 
Eric
Member
#1 | Posted: 19 Sep 2013 12:21 
Hi Andre,

I am having an issue with find/replace using regular expressions.

I have the following column of data:

Begin
Break
Catch
Class
Continue
Data
Define
Do
DynamicParam
Else
ElseIf
End
Exit
Filter
Finally
For
ForEach
From
Function
If
In
InlineScript
Parallel
Param
Process
Return
Sequence
Switch
Throw
Trap
Try
Until
Using
Var
While
Workflow

What I want to do is convert it to a row with each word separated by a ";"

Steps:

1. Place the cursor in front of "Begin"
2. Ctrl+H
3. In the Find what field, I enter the following:

\r

4. In the Replace with field, I enter the following:

;

5. The regular expressions checkbox is checked (Use Greedy regular expressions is also enabled in Preferences).

6. Click Replace All


Expected behavior:

Begin;Break;Catch;Class;...workflow

Current behavior:

Begin;Break
Catch;Class
Continue;Data
Define;Do
DynamicParam;Else
ElseIf;End
Exit;Filter
Finally;For
ForEach;From
Function;If
In;InlineScript
Parallel;Param
Process;Return
Sequence;Switch
Throw;Trap
Try;Until
Using;Var
While;Workflow

Am I missing something? These steps work in other editors.

Thanks.

Andre Santos
Carthago
Moderator
#2 | Posted: 19 Sep 2013 14:25 
Eric,

It seems indeed an issue in this particular case with Regurlar expressions, I can reproduce the problem. I'll look into it.

In the meantime, for this exact task, you can use the command Format Text - Join Lines.

Thanks,
André Santos
Carthago Software Support
http://www.carthagosoft.net

Eric
Member
#3 | Posted: 19 Sep 2013 20:59 
Hi Andre,

Thank for checking it out. And thanks for the Join Lines tip. Works quite nicely :)

Twistpad Carthago Software forums / Twistpad /
 Find/Replace issue with regex

Your Reply Click this icon to move up to the quoted message


 
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.

 

  Powered By minibb