DRM function to replace the comma in a string
Hello
I'm new to the DRM. I have a requirement to replace insérent in a string with the semicolon (-). Is it all built in function to achieve.
For example -.
input string is s1, s2, s3
Output string should be s1, s2, s3.
I tried to use the ReplaceStr function. This works well for replacing any other, but for the comma, it does not work.
Appreciate your help.
It works for me with the formula below to do a global search of replacement that uses properties to store the string the comma (s) must withdraw and a global property to contain the decimal point itself:
ReplaceStr (PropValue (Custom.String), (Custom.Comma) PropValue,, T)
You've been do not add commas directly in the formula contained in the definition of the property you have? That would by way too many parameters in the function when the formula is analyzed for you would end up with something like ' DRM-25620: number of parameters for the function "ReplaceStr" invalid. " 4 expected, found 5. »
Concerning
Craig
Tags: Business Intelligence
Similar Questions
-
Chr (44) to replace the commas separating the arguments of a function?
In Oracle SQL, it is possible to replace the commas between the arguments of the function with chr (44)? A simple example with substr():
substr ("yyyy", 1, 1) - the result is 'a '.
vs
substr ("aaaa" chr (44) 1 chr (44) 1)-this should also return 'a '.
Is there a way to make the second example works the same way as the first? I tried different techniques escaping, string concat, etc., and I failed. Is there a method to replace the comma (",") the character of the way I'm looking for or is this impossible?
Thank you
N °
The Analyzer seeks commas, not for other things you as a human being assimilated by a comma.
-
replace the comma with point to a string
Hello
I tried to replace the comma in the chain attached to a point, but I can't make it work. What I am doing wrong?
Calle cordially
You have a space after the comma in your string constant.
-
Replace the comma between quotation MARK
Hello
Here, I want to replace the comma between CITATION to "#", but my boss does not work...
could someone help me please?
SELECT
REGEXP_REPLACE ("Mike" JOHN, KELLY "Marc")
"" [^,] * (EN) [^,] * "', ' #»(, 1, 1) AS A RESULT"
DOUBLE;
Maybe
Select ' Mike, Michel 'JOHN, KELLY' Marc' orig.
regexp_replace (' Mike, Michel 'JOHN KELLY' Marc', '"(\w+), (\w+)" ', '"\1#\2" ' ") new_val
of the double
ORIG NEW_VAL Mike, 'JOHN KELLY' of Michel Marc Mike, Michel 'JOHN #KELLY' Marc Concerning
Etbin
-
Is there a function to adjust the length of a string to 8 multiple bytes?
Hello
I have a function to encrypt a password.
FUNCTION encodeit (p_name IN VARCHAR2, p_password IN VARCHAR2) RETURN VARCHAR2 IS l_password VARCHAR2 (4000); l_salt VARCHAR2 (4000) := 'hdjikndbbhitasuihfnnkqyhiplwmneuyndnloidj'; BEGIN l_password := UTL_RAW.cast_to_raw ( DBMS_OBFUSCATION_TOOLKIT.md5 ( input_string => p_password || SUBSTR (l_salt, 10, 13)|| LOWER (p_name)|| SUBSTR (l_salt, 4, 10))); RETURN l_password; END;
I want to decrypt the password to send to users when they forget it. I wrote this function:
FUNCTION decodeit (p_name IN VARCHAR2, p_password in VARCHAR2) RETURN VARCHAR2 IS l_salt VARCHAR2 (4000) := 'hdjikndbbhitasuihfnnkqyhiplwmneuyndnloidj'; BEGIN RETURN DBMS_OBFUSCATION_TOOLKIT.desdecrypt(input_string => p_password || SUBSTR (l_salt, 10, 13)|| LOWER (p_name)|| SUBSTR (l_salt, 4, 10), key_string => l_salt) ; END;
The problem is that the DBMS_OBFUSCATION_TOOLKIT.desdecrypt function needs a multiple of the input string of 8 bytes. And p_name and p_password are not of fixed length. Is there a function to adjust the length of a string to 8 multiple bytes?
Best regards.
They used to work - could be almost ten years (I think version 9 - not tested yet)
As you can see, you can 'encode' the number of characters, padded in order to set the right length of the decrypted string
create or replace FUNCTION ' CRYPTIN "(p_str in varchar2) return varchar2 as". "
l_data VARCHAR2 (255);
function pad_DES (p_string in varchar2) return varchar2 is
-platelets p_string with pad_chr containing the number of characters padded (1 to 8)
-make the string length a multiple of 8 as required by decipher
pad_length pls_integer;
pad_char char: = chr (0);
pad_chars varchar2 (8);
Start
pad_length: = 8 - mod (length (p_string), 8);
pad_chars: = chr (pad_length);
Return concat (p_string, rpad (pad_chars, pad_length, pad_chars));
end;
Start
l_data: = pad_DES (p_str);
dbms_obfuscation_toolkit. Decrypt (input_string-online l_data, key_string => 'MagicKey' encrypted_string-online l_data);
return UTL_RAW. CAST_TO_RAW (l_data);
end;
create or replace FUNCTION ' CRYPTOUT "(p_str in varchar2) return varchar2 as". "
l_data VARCHAR2 (255);
function unpad_DES (p_string in varchar2) return varchar2 is
-Removes from p_string upholstered characters (1 to 8)
pad_length pls_integer;
Start
pad_length: = length (p_string);
pad_length: = pad_length - ascii (substr(p_string,pad_length,1));
Return substr(p_string,1,pad_length);
end;
Start
l_data: = p_str;
dbms_obfuscation_toolkit. DESDecrypt (input_string-online l_data, key_string => 'MagicKey', decrypted_string-online l_data);
Return unpad_DES (l_data);
end;
Concerning
Etbin
-
Replace the comma with a period in a text layer expression
Hello!
I need to make a simple counter to 0 billion, so I found this expression that works perfectly:
Start code
startTime = 0; seconds
endTime = 5; seconds
beginCount = 0;
endCount = 9700698977;
hasCommas = true;
function addCommas (s) {}
If (s.length < = 3)
return s;
on the other
Return s.substring (0, 3) + ', ' + addCommas (s.substring (3, s.length));
}
function reverse (s) {}
newStr = "";
for (i = s.length - 1; i > = 0; i--)
newStr += s.charAt (i)
return newStr;
}
Val = Math.round (linear (time, startTime, endTime, beginCount, endCount));
If (hasCommas)
reverse (addCommas (reverse (val + "")))
on the other
Val
end of the code
The problem is that I need to change the commas with pins to look like 9.700.698.977, someone knows how to do?
Just change this line:
Return s.substring (0, 3) + ', ' + addCommas (s.substring (3, s.length));
to do this:
Return s.substring (0, 3) + '. ' + addCommas (s.substring (3, s.length));
Dan
-
Replace the comma with the liquid matrix code
Hey people,
I might not even wrong terminology, but I'm stumped on this question.
I have a picture of an element of app web listbox that out puts the following liquid on the DETAILS page:
"Fuel products': 'Diesel (high-speed), Premium ULP, ULP regularly."
I am willing to spend the commas in the table with an icon of fonts, for example:
< span class = "find the fa - fa" > < / span >
I tried using the 'Replace' filter but it does not work. And I tried to use "capture", but there is clearly a funky coding that I completely missed. Help, please...
{capture check %} < span class = "find the fa - fa" > < / span > {% endcapture}}
{{it. ["Products of fuel"] | {{replace: ",", "{{tick}}"}}
See you soon
James - RelianceIT
Hello
Try {{this. [' Fuel products] | {{replace: "," check mark}}
and let us know if it works.
Thank you
M
-
Hi all
I am getteing mad with the following problem and need your help.
I work in a PDF form - including a table. The values in this table create a datamatrix. It works fine for now.
My question: the values in the array are numbers like 12.2 but also 12 or 9 but maximum two digits before the '. '. (dot). Separator character must be a '. '. In Germany there is the ',' (comma) instead of '. ' on the numeric keypad.
For better usability, it would be nice to have a java script that replaces onBlur all ',' with a '. '. So I don't have to change the keyboard to English language.Is this possible and if so, how?
I'm a noob absolutely on javascript, so please be patient and don't expect any specific knowledge.
What I tried (menu is translatet from the German version, I don't know if this is correct):
onBlur.replace (",",".");
I put this in (right click on the form)-> properties-> action->
Add the action: at the exit of the mouse
Choose the action: run JavaScript
Click 'Add '.
Then I copied the terminus of the top in the window opening. Ready (at least that was my thought...)
He said does not work, now I nedd your help.
Thank you for your advice, your help and your time.
Adobe Acrobat XI (in German) on Windows 7 64 bit (also German).
***************SOLVED**********************
The solution was much easier than expected:
When you open 'Properties' by right-clicking on the form, go to the 'validation', NOT 'action' (make sure you are in forms editing mode: 'tools'-> 'forms'-> 'edit')
then choose 'execute user-defined script' and click 'change'.
type the following line:
Event.Value = event.value.replace (/ a, / g, ".");
Click 'OK' and then 'close '.
Then you are finished. Now, if you leave the Acrobat form field checks if there is a comma and replace it with a point.
For me, it was the best way to make it work.
***************SOLVED**********************
***************GELÖST**********************
Die Lösung war easier als gedacht.
SMS "Akbulak" man mit einem Rechtsklick auf das Formular, muss man ",Validierung" und nicht 'Promotions' Park. (man muss im Formulareditierungsmodus breast: "Tools"-> "Von"-> "Bearbeiten")
Dann unter "Benutzerdefiniertes Validierungsskript implement"auf"Berabeiten" klicken.
IM Editorfenster following line typing:
Event.Value = event.value.replace (/ a, / g, ".");
Den zu über back 'OK' und 'Schließen' Akbulak
War das Nun ersetzt Acrobat im Formularfeld jedes durch einen Punkt Komma.
***************GELÖST**********************
-
Replace the comma with space - we can do it without REGEXP?
11 GR 2 DB.
Can you replace comma with a space without using REGEXP?
Sample String: 'To,Replace,,Comma(s),,,,with space,,,' Expected output:'To Replace Comma(s) with space '
884476 wrote:
11 GR 2 DB.Can you replace comma with a space without using REGEXP?
You could do it with REPLACE nested...
select replace( replace( replace( 'To,Replace,,Comma(s),,,,with space,,,',',','#$' ), '$#','' ), '#$',' ' ) str from dual; STR ------------------------------- To Replace Comma(s) with space
-
Replace the comma with | in a column
Hi all
My requirement is like this:
In a column, I need to replace every third comma with | symbol.
Please help me.eg: 1,Animesh,1234,2,Tripathi,4321,3,Oracle,2345.....(and so on) Desired output: 1,Animesh,1234||2,Tripathi,4321||3,Oracle,2345....
-
Concerning
AnimeshHello
Here's one way:
WITH mydata AS ( SELECT '1,Animesh,1234,2,Tripathi,4321,3,Oracle,2345' txt FROM DUAL ) SELECT REGEXP_REPLACE (txt, '(([^,]*,){2}[^,]*)(,)', '\1||') txt FROM mydata; TXT ---------------------------------------------- 1,Animesh,1234||2,Tripathi,4321||3,Oracle,2345
Kind regards.
AlPublished by: Alberto Faenza December 11, 2012 11:51
Simplified regular expression -
Reg: Replace the comma with newline
Hi Experts,
I am a little confused and stuck with this... Tried many things but not able to do it properly.
Any help is appreciated... TIA.
Database version: Oracle 10.2-- "Input" with xx as( select 'x,a,(b,c),(d,e),f,g' x from dual ) select * from xx; -- "Expected Output" x a (b,c) (d,e) f g
Vanessa B.I gave you this already above.
with xx as( select 'x,a,(b,c),(d,e),f,g' x from dual ) , xxx as ( select regexp_replace(x, '(\([^,]+),([^,]+\))', '\1'||chr(1)||'\2') x from xx ) select replace ( regexp_replace(x, ',', chr(10)) ,chr(1) , ',' ) x from xxx
-
Help Removeing all the commas of the results table.
Good afternoon al,.
I'm pretty new on Oracle SQL developer and need a little help to find the best way to replace all commas in a table of results with ' > '.
I run a select statement:
SELECT
WHERECLAUSEVALUE
Of
FDM_SAB. TDATAMAP
ORDER BY WHERECLAUSEVALUE ASC
To produce a very simple table with 1 column. (see bleow):
*
*
*
*
00000,50000
00000,50000
00000,50000
00000,50000
00000,50000
00000,50000
As you can see some of the results contains a comma then a space, I'm looking to replace the "," (comma and space) with ' > ' (greater-than sign in). I guess this is done at a point with the function replace but have had no luck so far.
Any help would be greatly appreciated. Thank you very much
CharlieP.S. I'm new to this forum and this is my first post here; I apologize if my question is not clear or I don't give enough information.
Replace (columnname, ',' > ')
Should work for you.
If this isn't the case, please post what you've tried and show the results you get.
-
Replace the JQuery text is all the text in the webapp manufacture
Hello, I hope someone could give me a hand!
On this home page: www.largemouthfrog.net I am running a Web application called "Testimonials" which produces a string of words/phrases on the basis of the selected check box. "They come in the page as: < li >... <div class= 'testimony-commentaires1' >awesome! Excellent! really good < /div >... < /li >
For each < li > there is a separate set of words or phrases separated by a comma.
I want to remove the comma and replace < br >
I have the following JQuery (see below) which replaces the comma with < br > BUT it must be the first instance of < li > of
"<div class= 'testimony-commentaires1" > and it repeats again and again for all other < li > ' s. " In other words:
"great!, great!, really good" is repeated several times.I tried to put the JQuery inside available to the Web application list, but does the same thing.
< script >
{$(document) .ready (function ()}
var str = $(".testimonial-comments1").html () replace (/, / g, '< br / >');
$(".testimonial-comments1").html (str);
});;
< /script >
Any help would be appreciated!
Hi Wayne,
Your code is a bit too simplistic and it fails because it is not really
loop through all elements of web application and instead, it captures the content of the
first one defines the rest of them with this content. I have created some
code that will help you get started. Here it is:
$(".testimonial-comments1").each (function (index) {var tags_text =
$(this) .text (); var split_text = tags_text.split(',');
Console.log (split_text); });
You can see here http://mgtrain.worldsecuresystems.com/tags
My class is simply called "label" and my layout of the list looks like this:
{tag_name}
Basically, this code creates an array of strings for each iteration.
All you have to do now is to browse table and Add.
"to each.point, join the elements in a string, then set $(this) .text () of this new
value.
That said, I recommend you to build a form UL these options in this
case. It's a bit more semantic to me.
I can actually make this my first blog at www.twoblokeswithapostie.com
See you soon,.
Mario
-
Search and replace the string formatting
Hello
I try to do a search and replace the formatting of a string.
In the example, I'm looking for the string 'SUCCESSFUL', but it must also begin by usbflash and some number + PASSED.
I can't get the format to have a number between 1 and 99. The number of replacements should add up to 6 in this case. I tried with \d for any number, and I also tried [1-99].
Make a right-click on the function search and replace the string. There is an option to use regular Expressions. Then give it a try.
EDIT: You need to set the entry replace all to TRUE.
-
REGEXP_REPLACE remove the comma in double quotes
Hello
I am trying to remove the comma of a string in double quotes, currently I can only remove a comma using under sql
SELECT REGEXP_REPLACE (' "" A, B, C, def "', '(") ([^ "|,"] +) (,) ([^ ""] +) ("") ',' \1\2 \4\5' ') FROM DUAL;
output: 'A B, C, def'
But I need the form "A B C def".
Hello
Jarkko Turpeinen wrote:
... I think that I stop to answer here, because I don't understand of course questions
Very understandable. If my assumption is correct, the question would be much clearer if OP gave an example that included a few commas inside the quotation marks and some outside, as in the example below.
Here's a way to implement what I have described in the answer #2 above:
VARIABLE input_txt VARCHAR2 (100)
EXEC: input_txt: = 1, '2', ' A, B, C, def ", 3" foo, bar '4 ';
WITH got_parts AS
(
SELECT LEVEL AS part_num
, REGEXP_SUBSTR (: input_txt)
, '[^"]*("|$)'
1
LEVEL
) AS part_txt
OF the double
CONNECT BY LEVEL<= 1="" +="" regexp_count="" (="">=>
, '"'
)
)
SELECT LISTAGG (CASE
WHEN MOD (part_num, 2) = 0
THEN REPLACE (part_txt, ',')
Of OTHER part_txt
END
) Within AS output_txt GROUP (ORDER BY part_num)
OF got_parts
;
Maybe you are looking for
-
Info on "subject:-' places?
Is there anywhere I can see brief descriptions and instructions for * everything * "subject:-' addresses I could find useful? I use Firefox for many years and since on Win 3.1 days (and BACK to the years before that), but about: blank and about: conf
-
I have a HP printer/scanner/fax multifunction, and after updating my Mac OS X Sierra, the "HP Scan" app does not allow me to save my scans more. Printing seems to work very well. Scanning occurs, but when it comes to saving what I scanned, 'save' but
-
Hello When I try to delete files or folders in the iPhoto library or photo library package, I get this kind of error: "The operation cannot be completed because one or more required elements are not found. (code error - 43) » In English, it says some
-
How to disable the legend of a graph of cursor?
Hi all in my application, there is a graph with a multiplot slider with his legend. The user moves the cursor and plot values are shown in the legend but I want to avoid the user to remove the existing cursor or create a new one using the legend of c
-
Printer drukt niet af vanuit documenten
Hallo, heb sinds twee dagen een groot clean ik kan niet meer vanuit mijn documenten afdrikken, vanaf een website en andere things hij wel ITU print help! HEB Dora in Haag documenten die ik nodig Heb. naked wat organised? MVG Filius