Find and replace text
Hello
I need to find and replace the string below. can someone please help.
I have a 9E20300349013 string
If the second character is E or G, then I need strip of the first two charecters like 20300349013. I tried like, but is there a better way to do this in a single sql statement.
IF REGEXP_SUBSTR ('9E20300349013', ' [A - Z] +', 2, 1) = 'E' OR | |
REGEXP_SUBSTR ('9E20300349013', ' [A - Z] +', 2, 1) = 'G' THEN | |
-- | |
VAR_PCN_SCRUBBED: = REGEXP_SUBSTR ('9E20300349013', ' [0-9] +', 1, 2); | |
-- | |
END IF; |
IF SUBSTR ('9E20300349013', 2, 1) = 'E' OR | |
SUBSTR ('9E20300349013', 2, 1) = 'G' THEN | |
-- | |
VAR_PCN_SCRUBBED: = SUBSTR('9E20300349013',3); | |
-- | |
END IF; |
Hello
As Nick suggested, you can use only 1 operation instead of 2 = operations.
Instead of IF, you can use CASES.
Using regular expressions, you can also search for 'E' or 'G' at the same time, like this:
var_pcn_scrubbed: = REGEXP_REPLACE ('9E20300349013'
, '^. [EG] (.*)'
, '\1'
);
Tags: Database
Similar Questions
-
Find and replace text with formatted text.
I am trying to replace the text ' ^ 2 ' with '2' on photoshop by a search and replace, because there are many cases that on my image, but I can't seem to access any feature in photoshop which can do a search and replace for anything other than simple text. Is there a css solution, or a plugin that would allow me to do this? I have not sought on anything either on google search, although I will update this thread if I find something
Google found this discussion Forums Adobe with different versions of the script. I don't know exactly what made the script, but maybe it would work. You probably want to make a backup of your documents before you run it:
-
Find and replace text in documents invisibly
Hello
here in this forum I found the Russ find/replace function in ExtendScript, with which you can find and replace text. The script works perfectly when the documents are opened. In the case of invisibly open documents, that the script does not work since TextSelection is obviously applied. Refer to link:
I want to find and replace text within a structure of book, it would be useful if I could do it in documents that are not visibly open (Constants.FS_MakeVisible = false). Does anyone have an approach to find and replace in documents that are not visibly open? Or can someone confirm that this is only possible with TextSelection, which means that it does not work in documents open invisible?
Thank you very much!
Concerning
Apollo102
Apollo,
I looked into this and I was able to reproduce the problem. Unfortunately, I wasn't able to find a perfect solution. Running in the debugger, I found that the failure occurs with the Find() call. All paragraphs, the text ranges, etc. are valid... it's just that the Find() call fails to find anything.
I found that if you turn on/off the display, all of a sudden the Find() operation works with the hidden document:
doc. IsOnScreen = true;
doc. IsOnScreen = false;
I don't know if this is a practical solution and of course, you may as well open visible in the first place. Would be of no help to just disable the updates with the interface?
App. Display = false;
Just be sure to return true at the end of the script
I'm sorry I couldn't find a complete solution. It might be possible to appeal to something that makes the hidden document searchable, but I did not understand it.
Russ
-
Welcomes to "check spelling...". "and"find and replace text... "are disabled after I updated to Photoshop 2015 CC.
Does anyone have a solution?
Thank you
EliSomeone has found a work around that.
The link below.
But is not ideal could be useful as the current problems with the point highlight text/right click on/off "check spelling" options disabled after that update CC 2015 is ruining your workflow.
-
Find and replace text in hyperlinks
I want to find and replace text inside all hyperlinks inside my documents. What property of the hyperlink hyperlink text items is stored in?
I know that the text that the hyperlink is applied is stored in:. source.sourceText.contents myHyp [len]
But where is stored the hyperlink itself?
Say that I have a bunch of hyperlinks that look like: " " https://www.website.com/subsite1/Page1.html?ID=123 "
I want to find and replace "subsite1' with 'subsite2' in order to implement all the links" " https://www.website.com/subsite2/Page1.html?ID=123 "
Thank in advance for any assistance.
Hello
change . destination.destinationURL myHyp [len]
In your case:
// ............... var myDest = myHyp.destination.destinationURL, myDest = myDest.replace("subsite1","subsite2"); myHyp.destination.destinationURL = myDest; // ...............
Jarek
-
How to find and replace text in the index entries?
Hello
Recently, I copied a manual to create a new one for another product. After a global search and replace the product names and other texts, I needed to replace a specific word that appears in the index entries.
I noticed the search box would allow me to search the text of the marker, but I had to replaceme the word by hand - cut and paste the new Word, click on change the marker to save it and then find the next occurrence.
It's with frame 7.2. Does anyone know a faster way to do this?
Yours,
Michael F.
=========
Peter,
Thanks for the lead.
I downloaded the zip file and all it contains is a DLL file, but no instructions.
What should I do to make it work and how do I know that it works?
Yours,
Michael F
========
-
Is it possible to access find and replace text in a script?
I need to replace the part of a chain that has differently formatted text inside all in preserving the formatting.
JavaScript or AppleScript
I think it can be done with the code ActionManager scriptinglistener.plugin product.
Replace the text.
function replaceText (replaceThis, replaceWith) {}
// =======================================================
var idreplace is stringIDToTypeID ('replace');.
var desc22 = new ActionDescriptor();
var idnull = charIDToTypeID ("null");
Ref3 var = new ActionReference();
var idPrpr = charIDToTypeID ("Rprp");
var idreplace is stringIDToTypeID ('replace');.
Ref3.putProperty (idPrpr, idreplace);
var idTxLr = charIDToTypeID ("TxLr");
var idOrdn = charIDToTypeID ('Ordn');
Ideal var = charIDToTypeID ("Al");
Ref3.putEnumerated (idTxLr, idOrdn, ideal);
desc22.putReference (idnull, ref3);
var idUsng = charIDToTypeID ("Usng");
var desc23 = new ActionDescriptor();
var idfind = stringIDToTypeID ("find");
desc23.putString (idfind, replaceThis);
var idreplace is stringIDToTypeID ('replace');.
desc23.putString (idreplace, replaceWith);
var idcheckAll = stringIDToTypeID ("checkAll");
desc23.putBoolean (idcheckAll, true);
var idFwd = charIDToTypeID ("Fwd");
desc23.putBoolean (idFwd, true);
var idcaseSensitive = stringIDToTypeID ("caseSensitive");
desc23.putBoolean (idcaseSensitive, false);
var idwholeWord = stringIDToTypeID ("wholeWord");
desc23.putBoolean (idwholeWord, false);
var idignoreAccents = stringIDToTypeID ("ignoreAccents");
desc23.putBoolean (idignoreAccents, true);
var idfindReplace = stringIDToTypeID ("findReplace");
desc22.putObject (idUsng, idfindReplace, desc23);
executeAction (idreplace, desc22, DialogModes.NO);
};
-
Hello Forum,
I'm an Illustrator scripting challenge I'm trying to understand. I'm totally new to writing scripts in Illustrator, although I did dev Java and Javascript before. I create a huge list of examples of binary number conversions in decimal, and I need a good way to change the decimal text with each new page of data. (Yes, I know that there are tools of conversion from decimal to binary online, but for this project that I need to have a chart of at least the 32 first of every 256 numbers in order to show the model.) So far, I've been manually change on decimal numbers with each new page. I created layers for the bosses of the binary numbers that can be easily exchanged as they progress, then this isn't a problem. The problem is that changing the decimal numbers for each page is really tedious when you do page after page after page. (See attached example)
I need a script that will change the decimal numbers as a fast progression. For example, the next set of numbers in the attached example would be 33024-33055. Yes, is there a way to select all text objects (32768-32799), if they are in a separate layer by themselves and to change the script to the 33024, 33025, 33026, 33027, 33028, and so forth, in a sequence that I can set each time I run the script?
Thanks for your help!
The script response is:
var docRef = activeDocument;
Query the user from sequence numbervar n = number (prompt ("enter from number"));
Renames the layers to refer to the new numbering
docRef.activeLayer.name = "Numbers" + n + "-" + (n + 31);
change the contents of each text in the active layer object; Progresses backwards due to the order of the objects of text being the reverse of the order of the numbers
because they just happened to be that way for a reason any!for (i = 31; I > = 0; i--) {}
docRef.textFrames [i] = n .silence;
n ++ ;
}
Redraw();
Now, if I can just understand how to duplicate the layer automatically, I'll be set. Yet, this will speed up things a lot.
-
Find and replace the phone number on 1000 PDFs
Hello
Anyone know of a faster way to find and replace text (phone number) on a PDF, we have a 1000 needing PDF files
Edition, pitstop even can't do it quickly.
Thanks in advance
Paul
PDF files were not intended to be edited on such a scale. The only way that such a task can be automated is by the new text which is superimposed on the old, with fields or comments and then flatten the file. But if the location of the text changes a file in a file, or the length of the new text is not exactly the same as that of the former or the font properties are not known in advance, this becomes almost a mission impossible.
-
Search and replace text in multiple columns
I have a document with 4 columns that repeat throughout the document in different lines. I would like to find and replace text for all 4 columns at the same time. I tried a number of special characters between my column information but still can't seem to find the line. I've included an example below of the appearance of my lines. I would like to find and replace the first line and the third row.
Header 1 Header 2 Header 3 Header 4 one b c d e f g h one b c d e f g h Here is the special character combos, I tried:
a ^ Mb ^ Mc ^ Md
a ^? b ^ > c ^? d
Thoughts?
You can only select entire flood, copy it and select each time the raw and paste. There is no simple method to detect the sequence of the fields in a table.
-
I would use VBA and Excel programmatically open numbered Dreamweaver HTML (CS5) and find and replace text in the view code in these files, save and close them.
I have 5000 associations between find: x 0001 and replace: y0001 in an Excel sheet.
I have written VBA but do not know how to open, close and save the code in the .html files view. Please... and thank you...
I use ASP.net for backend coding, I use PHP. If you want to stay with Microsoft technologies, and then you would like to use ASP.net. and a Microsoft server.
When you have a Web site that contains many pages with similar content structure, the practice is to store all content and all variables in a database. It is possible to create a site that has hundreds of 'pages', with many variations in the pages, so they don't all look like clones, and yet all this might be based on a single web page. A website as Amazon.com has millions of 'pages', but may actually have only a dozen basic page structures.
Convert what you now have a system like this would be a fair amount of work, but it's the way to go now.
-
How to find and replace this text in the url
I have a NCLOB column with a text with the url between the two as shown below:
========================================================================
This text is intended to testign. This text is intended to testign.
< a PL/SQL and SQL < U PL/SQL and SQL / < u > < / a >
Required text is also aimed at testign. This text is intended to testign.
< a http://forums.oracle.com > < oracle metalink U > < / u > < / a >
This text is intended to testign. This text is intended to testign. This text is intended to testign. This text is intended to testign. This text is intended to testign. This text is intended to testign. This text is intended to testign. This text is intended to testign.
========================================================================
Requirement:
========
It is necessary to implement find and replace functionality.
I just need to check if the search text is present in the url or not?
Suppose that if research of orcale.com, given that research should therefore be successful otherwise search for his part of the url must be unsuccessful.
Here, I can give you the indicator, as always the url is located between the anchor tags * (< < /A >). *
Tahnks in advance.SELECT REGEXP_SUBSTR('testhttp://forums.oracle.comoracle.comhttp://ora.com', '((.*?oracle\.com.*))') FROM dual
-
Hello world
Setup
I have a line that connects two cycles in two different VI.
The vi share the queue by a reference.
Now that I changed the format of the queue of the enum element to a cluster of enum and date
my queue reference has changed as well.
Question
How to replace (rebind) all variable instances of variables of refnum "old_queue" with "new_queue" refnum queue queued?
What I tried
I tried to use 'Find and replace' but it doesn't let me do: in text mode, it displays an icon crossed close to all
He found bodies, and in graphic mode, that is not has such an option, as substitute a variable refnum.
First: a lesson for next time. Check the data type of the queue a typedef. Now, the problem goes away. Change the typedef and all references.
Lesson for next time bonus do not transmit queue around references. It is not necessary. Queues can be appointed. For another reference to the same queue, all what you need to know is its name.
To answer your basic question, you can't. You'll just have to follow the wires around and replace them manually.
Mike...
-
InDesign, find and replace
Hi, can anyone help with this problem, I have tried searching online a few times, but no luck.
I have a paragraph with several capital letters in square brackets, for example: AAAAA (1) or (2) BBBB. If I need a "BOLD" of each of them, I will have to look for each other and manually "BOLD".
Is there a function in find and replace that can auto search for this kind of texts and "BOLD" of all?
Or GREP functions?
Concerning
Lily
\(\d\) [\u\h] + \u
(^/)
-
Asked if Framemaker has a global find and replace function cancellation capital letters in sentences. I remember vaguely word being able to do that, but it's been some time that I used Word. I inherited a document in which the author used caps init on almost everything.
Find/replace is powerful in FrameMaker but doesn't address this specific issue. If you want to stay in FrameMaker remedy, you can either:
1. Enter the text formatting toolbar to access the case for change (dark red) buttons:
2. use keyboard shortcuts:
Maybe you are looking for
-
How do I activate the calendar when you first start, I chose disable
I can not activate the calendar. On the first run, I chose 'Disable sockets calendar' and now I can not activate.How to activate? I try to reinstall Thunderbird and add addons Lightning, but even now calendar options.
-
Last week, I received the tablet. Since then, the OTA update failed 3 times. So I searched around the Web and found a page which State to load the update.zip to SD card and install on recovery Menu: http://h30434.www3.HP.com/T5/Android/Pro-slate-8-up
-
How to install Java or uninstall Yosemite?
Upgraded my macbook in Yosemite. Some applications do not work, say they need Java SE 6, a "legacy" Java version. Not vital apps, but I would like to make. MacBook is now painfully slow and buggy. I have to keep applications force - quit smoking. iPh
-
Hello I use ascii_diadem_9.1_or_later.zip to merge the data from several .csv files. The problem is that I am so some weird futuristic timestamps in a channel which do not appear in the original .csv files: How to adjust the VB Script automatically a
-
HP 15 ac110tx: which is the driver to control the fan speed?
I'm a bit confused and don't know exactly the name of the driver that controls the speed of the if laptop fan... .Please let me know the same thing...Thank you...