Formula to replace characters in a string

Hi all

Is it possible to replace characters in a string somewhere if the string has no specific pattern for these characters? I use the replacestr function to replace characters in a string (i.e. ABC), but the chain is in the ABC format * where * are two random characters. The result I'm looking for is to replace ABC * with the NodeID.

ReplaceStr (propvalue (Core.Abbrev), ABC, ID (), T),) This formula works, but is either two additional characters in the end, after ABC. How can I cut that?

Thank you

If)

Not (Equals (Integer, length (PropValue (Core.ABBREV)), length (ReplaceStr (PropValue (Core.ABBREV), ABC, T))),

ReplaceStr (PropValue (Core.Abbrev), PropValue (Core.Abbrev), ID (), T),

PropValue (Core.Abbrev)

)

Tags: Business Intelligence

Similar Questions

  • replace characters in the string

    Hi all

    Is it possible to index the characters in a string as if it were a table and remove them from the second position and now. I just want with the first letter or number so that I can later concatenate strings to it.

    Thanks for any help!

    -Michael

    Hi Michael,

    Yes. Use the function "Sring subset. At the beginning the value 0 (default value) and the length of 1.

    This will give you the first character in the string.

    Steve

  • How to remove the first 11 characters of a string

    With the help of ' XML Publusher Desktop / generator model for Word / 5.6 Build 45'

    I use XML Publisher. With the help of a RTF model, to generate purchase orders by email of the purchase of the Oracle.

    The fields are drawn from the XML code generated by Oracle.

    One of the fields is the place of delivery Description field.

    Will appear in the report as follows:

    * & lt;? SHIP_TO_LOCATION_NAME? & gt; *

    When I attach a test XML file in Word and view the output, one of my test case returns a description of the site:

    DON'T code USE County Hall of Global location

    What I have to do is to remove the * DO NOT USE * according to the description of the location.

    I could do is a Find / Replace, or a substring to ignore the first 11 characters from the string. But I don't know how to do it.

    Any help would be much appreciated, because it is a production problem that is causing a bit of a small problem for us!

    Thank you very much.

    Hello
    Maybe you know this syntax :)

    Rahul

  • Remove 10 characters of this string

    How to remove the last 10 characters of any string?

    \

    Keep throwing me these easier!

  • separate the characters in a string

    Hello

    Y at - it an easy way of seprerate characters in a string

    For example if I have a string 'abcdef '.

    I want to seprate it in an array of 7 elements, where each element is a character in the string.

    Thank you

    Hi reza_sed,

    the attached picture shows one solution.

    Mike

  • How to remove the first few characters of a string of liquid

    I would like to delete the first three characters of a string of liquid. The question is how.

    If I use the markup according to liquid when I know what are the first characters

    {{it. {{["Estate status'] | strip_html | remove_first:"11."}}

    It will remove the 11 characters.

    But if I don't know what are the first characters, this markup can I use to get "RID" of the first three characters?

    I tried 'split' and 'slice', but it must always know what characters to split or slice.

    Thanks for any help.

    Kind regards

    Carla

    Assign a value into slices and you can have table data that you can get out.

  • Bunch of Oracle on the special characters in a string - translate?

    How to remove special characters in a string, it can contain. , (space), etc.

    SELECT TRANSLATE('123.456 (90-90)', '', '') FROM DUAL
    

    Basically I want to undress and to compare with the db value.

    WHERE TRANSLATE(TABLE.NUMCODE, '', '')  = TRANSLATE('123.456 (90-90)', '', '') 
    

    Use TRANSLATE, since you're on 9i. For example:

    TRANSLATE (your_string,'X,. #! % @$ ^ & * () _-+=', 'X')

    Removes all the s characters in ', #! % @$ ^ & * () _-+=' of your_string.

    SY.

  • last 3 characters of a string

    How to get the last 3 characters of a string occuring after a character / alphabet  without using REGEXP_SUBSTR ? 
    
    Ex: 10000A001 is the string.
    
    Note: -  I want to use it in Oracle reports 6i, therefore i cannot use the statement REGEXP_SUBSTR 
    
    Sanjay

    Hello

    substr('10000A001',-3)
    
  • extract characters from a string

    Hi gurus,
    I want to extract the first, third, fifth, seventh... characters in a string.
    not to extract characters from a subset of characters in a select query in oracle 9i database.

    for example (1):
    Assume that a string like this "SUE" is that I am 'ACEGI"of the source string
    and the source can be any valid string, I just give an example here.

    Example (2) of "kalpataru' in klatau'

    Please guide me for this

    for 9i:

    SQL> with t as (
     select 'ABCDEFGHIJ' str from dual union
     select 'kalpataru' from dual
    )
    --
    --
     select str,
            trim(extract(xmlagg(xmlelement(e, substr(str,level,1)) order by level),'//text()')) str2   from t
      where mod(level,2) = 1
    connect by level <= length(str) and prior str = str and prior sys_guid() is not null
      group by str
    /
    STR        STR2
    ---------- --------------
    ABCDEFGHIJ ACEGI
    kalpataru  klaau         
    
  • Replacement of a set of characters in a string of oracle sql query

    I want to replace a set of characters (~!)     @    #     $     %     ^     *     /     \     +    :    ;    |     <>?    _,) to a SQL STRING

    Select "TEST! "ABC 123 #"

    FROM DUAL;

    What is the best way to do it? Please provide examples also.

    If you are sure the character set you want to delete, you can use TRANSLATE like that.

    (supposed)-

    SELECT TRANSLATE ("TEST! ABC 123 #', '-~ ! @# $% ^ * / \ + : ; |<>? _,', ' ') FROM DUAL ;

    See you soon,.

    Manik.

  • replace only the last 3 characters within a string

    Hi all
    I have the string "abcdef_01". How can I replace the last 3 characters with "000"? in this string, for example "_01" should be replaced by '000'. Any way to do it, without the concatenation of the original string with the last 3 characters replaced by "000"?
    Thank you

    Edited by: Roger22 the 18.10.2011 09:29

    Yes, you can...

    SELECT rpad(substr('abcdef_01',1,length('abcdef_01')-3),length('abcdef_01'),chr(dbms_random.value(32,64))
                                                                             || chr(dbms_random.value(32,64))
                                                                             || chr(dbms_random.value(32,64)))
    FROM dual;
    

    RPAD/lpad may use a third parameter that is longer than 1 character and - if the duration of param 1 + length of parameter 3 is longer that parameter 2 - truncates the result to fit the length of parameter 2.

    HTH

  • Replace special characters in a string

    Let's say that someone copies the list as follows and the glue in a Javascript dialog box:

    302304

    305678

    245675

    How do I manipulate the string so that it reads:

    302304 305678 245675

    In other words, how to replace manual line breaks in a string with spaces?

    Thank you!

    It's the cleanest method that you are looking for:

    /[\n\r]/
    

    In this case, even a simple \s would work, but it's maybe not what the OP...

    Substances

  • The analysis of the non-numeric characters in a string

    Hello

    I am communicating a robot to LabVIEW (2013) via TCP/IP and sockets. The robot is the server, and LV is the customer.

    I start with the target data in this format (in a string):

    "[0 ~ 100 ~ 0] ~ [0.96593 ~-0.25882 ~ 0 ~ 0] ~ [1 ~ 0 ~ 0 ~ 0] ~ [150 ~ 50]."

    [X, Y, Z], [Q1, Q2, Q3, Q4], [C1, C4, C6, Cx], [TCPVel, OrientVel] except replacement ',' (comma) with a ' ~ ' (tilde) because I load the target data in a spreadsheet which is a comma-delimited file.

    In LV, I take this string, the analysis of the chain and split individual items. I then pulled the singular elements as unique, 32-bit of real numbers. I take each one and convert them individually to a string, concatenate them and send them to the robot. The robot decompresses these raw bytes individually and converts them to a target of robot (position in space).

    I train (BT) check if the user has sent a bad character (non-digital) in the target data. Example of this is:

    [- 50 ~-150 ~ 0] ~ [0.96593 ~-0 ] [B2has5D882 ~ 0 ~ 0] ~ [1 ~-1 ~ 0 ~ 0] ~ [150 ~ 50]

    Now in BT, when I'm scanning the chain, these bad character becomes the entire element to zero and everything else then to zero as well. See attachment for example screen similar.

    My question is, my VI, I can analyze all non-numeric characters (that are inside the parentheses and characters that are NOT a ' ~ ' (tilde))? In this way, I can always get this item numbers and do not have this element or other items turn to zero?

    Thanks in advance for any help!

    Sorry for the question of the test

    SM


  • How you can limit the number of characters in a string attribute?

    I'm trying to fix a limit on the amount of characters that can be introduced to a string attribute.

    I saw that you can do when the user changes the web using regex mode, but how you can specify a maximum length when the user is in the form view that this currently replace the regex used in the tag on the inside: edit

    Thanks in advance,

    Andrew

    Hi André,.

    You can use the output of the editor boxes TEXTFIELD attribute.

    Just create a new attribute with the following configuration editor in the XLM:

    You can manage the size-> XSIZE and maximum number of characters-> MAXCHARS.

    I hope it helps.

    Kind regards

    Enrique

  • How to remove special characters from the string using translate() without typing all special characters?

    Hi all

    I am trying to remove special characters without the help of regular expressions.

    translate (the column name or string,'!@#$ & * (* () _) * "" :} {?}) >? /, «, » ')

    I want to eliminate this manual process to give all special characters using a chr() or ascii() function.

    Please show me the way.

    Thanks in advance

    Similar to the solution of Michael...

    SQL > ed
    A written file afiedt.buf

    1 with t as (select "[it comes of the #] [more amazing!") Test @# "$* & $%) assuming chain cost $ 5 000' double Str)
    2, i like (select level 1 c from dual connect by level<=>
    3 less
    4 Select + 32 (level-1) double connect by level<=>
    5 less
    6 select + 58 (level-1) double connect by level<=>
    7 less
    8 select + 91 (level-1) double connect by level<=>
    9 less
    10. Select 123 + (level-1) from dual connect by level<=>
    11 less
    12. Select 255 double
    13            )
    14, ts as (select level r, substr (str, level 1) c
    15 t
    16 connect by level<=>
    17             )
    18, tf as (select row_number() (order for r) r
    19                    ,ts.c
    20 TS
    21 I join on (i.c = ascii (ts.c))
    22             )
    23 select replace (sys_connect_by_path(c,'!'),'! ') Str
    24 TF
    25 where connect_by_isleaf = 1
    26 connect r = prior r + 1
    27 * start with r = 1
    SQL > /.

    STR
    -----------------------------------------------------------------------------------------------------------------------
    Thisisthemostamazingtest¸astringcosting5000

    Or something as horrible as this...

    SQL > ed
    A written file afiedt.buf

    1 with t as (select "[it comes of the #] [more amazing!") Test @# "$* & $%) assuming chain cost $ 5 000' double Str)
    2, I like (select replace (sys_connect_by_path (chr (c), 'A'), 'A') as tr)
    3 of)
    4 select c, rownum r
    5 (select 32 + (level-1) as the double connection by level c<=>
    6                         union
    7 select + 58 (level-1) double connect by level<=>
    8                         union
    9 select + 91 (level-1) double connect by level<=>
    10 the union
    11. Select 123 + (level-1) from dual connect by level<=>
    12 union
    13. Select 255 double
    14 tri 1
    15                        )
    16                  )
    17 where connect_by_isleaf = 1
    18 log r = prior r + 1
    19 start with r = 1
    20            )
    21 select translate (str, 'A' |) TR, 'A') as str
    22 * t, I
    SQL > /.

    STR
    --------------------------------------------------------------------
    Thisisthemostamazingtest¸astringcosting5000

Maybe you are looking for