Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

regex pattern

Former Member
0 Likes
905

Hi,

string fieldvalue = ' 80.99-'

after regex - string fieldvalue = ' -80.99'

is there a regex way to move the "-"(last char) to the first digit(before the first occurence of a digit) ?

and maybe move the complete value to the outer right.

thx,

Gordon

Edited by: Gordon Breuer on May 19, 2009 10:36 AM

9 REPLIES 9
Read only

Former Member
0 Likes
877

Try using EDIT_MASK :


write : g_var EDIT_MASK '- __. __'.

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
877

Check FM : 'CLOI_PUT_SIGN_IN_FRONT'

Read only

Former Member
0 Likes
877

Hi,

Use this FM CLOI_PUT_SIGN_IN_FRONT to get the Minus sign at stating of the value.

Read only

0 Likes
877

This message was moderated.

Read only

0 Likes
877

FM is not available here.

i found a way to use regex even with shifting to outer right.


replace FIRST OCCURRENCE OF regex '\<[[:alnum:]]+\>'
     IN text with '-$0'.

thx!

Read only

0 Likes
877

FM is not available here.

i found a way to use regex even with shifting to outer right.


replace FIRST OCCURRENCE OF regex '\<[[:alnum:]]+\>'
     IN text with '-$0'.

thx!

Read only

0 Likes
877

FM is not available here.

i found a way to use regex even with shifting to outer right.


replace FIRST OCCURRENCE OF regex '\<[[:alnum:]]+\>'
     IN text with '-$0'.

thx!

Read only

0 Likes
877

FM is not available here.

i found a way to use regex even with shifting to the outer right.


replace FIRST OCCURRENCE OF regex '\<[[:alnum:]]+\>'
     IN text with '-$0'.

thx!

Read only

Former Member
0 Likes
877

Sorry for double posting (Server Error at my side).Please delete unwanted posts.

Thx,

Gordon

Edited by: Gordon Breuer on May 19, 2009 10:47 AM