bugGNU Octave - Bugs: bug #50329, ${cmd} replacement operator in...

 
 

bug #50329: ${cmd} replacement operator in regexprep

Submitter:  Guillaume <gyom>
Submitted:  Thu 16 Feb 2017 03:24:31 PM UTC
   
 
Category:  Octave Function Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 17 Feb 2017 05:09:39 PM UTC, comment #1: 

Since dynamic expressions are yet to be implemented, will a patch that takes ${cmd} as replacement input for regexprep but input of cmd should be a static string?

Pranav Bhasin <pbhasin96>
Thu 16 Feb 2017 03:24:31 PM UTC, original submission:  

With Matlab, regexprep has an option to use ${cmd} in the replacement string to execute command cmd for each match:

https://www.mathworks.com/help/matlab/ref/regexprep.html#inputarg_replace


regexprep('aabb','ab','${fliplr($&)}')


Output should be 'abab' but Octave returns 'a${fliplr($&)}b'.

Guillaume <gyom>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pbhasin96 (Posted a comment)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by gyom (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-16 rik5 Severity3 - Normal 1 - Wish
        Item GroupMatlab Compatibility Feature Request
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code