Search string / replacement
I want to search and and following deletion:
1, *
2; constant in the space of one or more
example: * Monkey > monkey
* APE > ape
constant space > "no constant space.
Thank you!
Hello
Order the vi attached. To do this, you need.
Best regards,
Nitz
(Give the Kudos for the right answers, mark it as a solution if your problem is resolved...) )
Tags: NI Software
Similar Questions
-
I can't seem to make the "search and replace string" works as expected.
I tried to replace "^ []] +---+ ([^] +).» "$*" with $1 in "create table leq_octave_5min (recorded_time DATETIME CONSTRAINT pk1 PRIMARY KEY, leq5m leq5m of FLOAT CONSTRAINT NOT NULL, min min FLOAT CONSTRAINT NOT NULL, max max FLOAT CONSTRAINT NOT NULL, CONSTRAINT of FLOAT L05 05 NOT NULL, CONSTRAINT of FLOAT L10 10 NOT NULL, L50 FLOAT CONSTRAINT 50 NOT NULL, L90 FLOAT 90 CONSTRAINT NOT NULL. L95 FLOTTER CONSTRAINT 95 NON NULL, us01 us01 FLOAT CONSTRAINT NOT NULL, EN02 EN02 FLOTTER CONSTRAINT NOT NULL, fr03 FR03 FLOTTER CONSTRAINT NOT NULL, fr04 FR04 FLOTTER CONSTRAINT NOT NULL, fr05 FR05 FLOTTER CONSTRAINT NOT NULL, fr06 FR06 FLOTTER CONSTRAINT NOT NULL, fr07 FR07 FLOTTER CONSTRAINT NOT NULL, fr08 FR08 FLOTTER CONSTRAINT NOT NULL, fr09 FR09 FLOTTER CONSTRAINT NOT NULL, fr10 FR10 FLOTTER CONSTRAINT NOT NULL Fr11 FR11 FLOTTER CONSTRAINT NOT NULL, FR12 FLOTTER CONSTRAINT NOT NULL fr12, fr13 FR13 FLOTTER CONSTRAINT NOT NULL, fr14 FR14 FLOTTER CONSTRAINT NOT NULL, fr15 FR15 FLOTTER CONSTRAINT NOT NULL, fr16 FR16 FLOTTER CONSTRAINT NOT NULL, fr17 FR17 FLOTTER CONSTRAINT NOT NULL, fr18 FR18 FLOTTER CONSTRAINT NOT NULL, fr19 FR19 FLOTTER CONSTRAINT NOT NULL, fr20 FR20 FLOTTER CONSTRAINT NOT NULL, fr21 FR21 FLOTTER CONSTRAINT NOT NULL Fr22 FR22 FLOTTER CONSTRAINT NOT NULL "(, e23, e23 FLOTTER CONSTRAINT NOT NULL, fr24 FR24 FLOAT CONSTRAINT NOT NULL, fr25 FR25 FLOTTER CONSTRAINT NOT NULL, fr26 FR26 FLOTTENT CONSTRAINT NOT NULL, fr27 FR27 FLOTTER CONSTRAINT NOT NULL, fr28 FR28 FLOTTER CONSTRAINT NOT NULL, fr29 FR29 FLOTTER CONSTRAINT NOT NULL, fr30 FR30 FLOTTER CONSTRAINT NOT NULL, status TEXT (2) st NOT NULL CONSTRAINT).
The goal was to get the third token, 'leq_octave_5min '.
The result string is "leq_octave_5min", but the real result string is the input string itself.
What is the problem with my method?
I'm sorry.
I forgot to turn on 'regular expressions' in "Search and replace the String" VI.
After having turned it on, it works as expected.
-
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.
-
Search and replace, unadulterated second character?
I'm doing a VI that communicates with an external device via a protocol consisting of images. I made a couple of subVIs that put these images together as hexadecimal strings which are then converted into numbers and passed to the device. The protocol uses an escape character to avoid sending a constant BOF or EOF at the wrong time. I did a Subvi, which is supposed to do this by using the search and replace. Initially, it looks quite elegant, but it has a fatal flaw, if one of the characters it is supposed to hide is written on the edge of a byte, it will always be replaced.
Example:
11 01 00 CE 0D 05 08 EA
is replaced by
11 01 00 05 08 EA 0D E7
C0, C1, 7 d are the characters to replace, the 7 d is the escape character.
Now I wonder, is it possible to do a search and replace function search only every second character in a string?
Hi Tzench,
Why you do not work with numbers of converts? It should be easier (and safer) to replace some U8 values instead of search (errors) & replace in a string...
You should also be careful when you give examples. So in your example, the "hex" number is separated by spaces, search & replace should not create problems with "byte-border '!
-
RegExp search and replace, keep the formatting of the original text
Hello!
Will have to perform the Search and replace within a framework of text using RegExp.
And to retain the original formatting of the text block.
How is it possible?
Bad example-, it converts all the text formatting to the format of the first character:
var reg = /a/gmi; var replacer = '*'; var fr = activeDocument.textFrames[0]; fr.contents = fr.contents.replace (reg , replacer);
Thank you!
I has not yet been tested your code.
But why you did not play with my code snippet, use something like this:
// regex_changeContentsOfWordOrString_RemainFormatting.jsx // regards pixxxel schubser var s = /arguments/gi; var replacer = "other string", result; var atf = activeDocument.textFrames[0]; while (result = s.exec(atf.contents)) { try { aCon = atf.characters[result.index]; aCon.length = result[0].length; aCon.contents = replacer; } catch (e) {}; }
Try it and have fun
-
I have to do a reformat complicated of an entire site. It is simplified to a series of search and replace tasks for each file. Each search and replace string was recorded in a .dwr file. Currently, I load and run each .dwr file.
How batch or automate this task in Dreamweaver? In other words, a series of files .dwr to consecutively run the tail?
OK, here we go.
This example, a simple command of Dreamweaver Extension, run two find and replace commands in a go. (It can be any number of commands find and replace).
The first command replaces 'the' and 'this' "phe" and "phis". The second paragraph command replaces
- ...
- ...
You need two files: an HTML file (for the UI) and a Javascript file (for actions). I named the 'Find and replace Test.html' and 'find and replace Test.js. (They can be any name).
Find and replace the file Test.html
Find and Replace Test Find and replace Test.js
function canAcceptCommand() { return true; } function commandButtons() { return new Array("Go!", "doIt()", "Cancel", "window.close()"); } function doIt() { dreamweaver.setUpFindReplace({ searchString: "th(e|is)", replaceString: "ph$1", searchWhat: "document", searchSource: true, useRegularExpressions: true }); dreamweaver.replaceAll(); dreamweaver.setUpFindReplace({ searchString: "<(/?)ul>", replaceString: "<$1ol>", searchWhat: "document", searchSource: true, useRegularExpressions: true }); dreamweaver.replaceAll(); window.close(); }
Basically, you can call any number of this pair of functions in the script:
dreamweaver.setUpFindReplace(findAndReplaceObject); dreamweaver.replaceAll();
Place these JS and HTML files in this directory:
Application Dreamweaver/Configuration/Commands Directory.
Then in Dreamweaver, open the window "insert." (You need to open an HTML file in order to make the active insertion window.) Above the insertion window, there is a drop down category ("Common" etc.). Do alt + click (ctrl + click) - then you'll see a 'Reload Extenesions' element at the bottom of the drop-down list. This will load this extension of DW. (Alternatively, you can restart DW to load the extension.)
It is now ready to run the Extension. Open an HTML document that you want to change. Go to the 'orders' in the menu bar. At the bottom of the drop-down list, there is an article "find and replace Test." Select and enjoy
Notes
- This example is configured to perform the search and replace on the active document. You can change the scope to the whole of the site, or the files selected, etc., as in the dialog box find and replace. The doc of the API is here: http://help.adobe.com/en_US/dreamweaver/cs/apiref/WS5b3ccc516d4fbf351e63e3d117f9e09bcf-7ed a.html
- You can use dreamweaver.setUpComplexFindReplace (xmlQueryString) command instead. xmlQueryString is essentially
... in your .dwr file, you can copy files .dwr. However xmlQueryString must be a continuous string (no line breaks), which can be a pain in the doc: http://help.adobe.com/en_US/dreamweaver/cs/apiref/WS5b3ccc516d4fbf351e63e3d117f9e09bcf-7ed 9 html
General ordering example Extension in the doc: http://help.adobe.com/en_US/dreamweaver/cs/extend/WS5b3ccc516d4fbf351e63e3d117f53d6ec3-7fe 6 html
I hope that all these wise...
--
Kenneth Kawamoto
-
Hello all,.
I'm trying to implement a procedure that returns records in the hr.employees table when search strings are passed.
Here is the package:
The results I get are as follows:create or replace package search_app IS -- TYPE emp_rec IS RECORD (last_name hr.employees.last_name%TYPE ,first_name hr.employees.first_name%TYPE ,job_id hr.employees.first_name%TYPE ,salary hr.employees.salary%TYPE ,dept hr.departments.department_name%TYPE ); -- TYPE emp_curs IS REF CURSOR RETURN emp_rec; -- PROCEDURE get_employees (p_last_name_search IN hr.employees.last_name%TYPE ,p_first_name_search IN hr.employees.first_name%TYPE ,p_job_id_search IN hr.employees.job_id%TYPE ,pr_emps OUT emp_curs ,p_error OUT VARCHAR2 ); -- END search_app; / -- create or replace package body search_app IS -- PROCEDURE get_employees (p_last_name_search IN hr.employees.last_name%TYPE ,p_first_name_search IN hr.employees.first_name%TYPE ,p_job_id_search IN hr.employees.job_id%TYPE ,pr_emps OUT emp_curs ,p_error OUT VARCHAR2 ) IS -- v_last_name_search hr.employees.last_name%TYPE; v_first_name_search hr.employees.first_name%TYPE; v_job_id_search VARCHAR2(100); v_error_msg VARCHAR2(200); -- BEGIN -- OPEN pr_emps FOR -- SELECT e.last_name ,e.first_name ,e.job_id ,e.salary ,d.department_name as dept FROM hr.employees e ,hr.departments d WHERE (e.first_name LIKE p_first_name_search AND --OR e.last_name LIKE p_last_name_search AND --OR e.job_id IN p_job_id_search ) AND d.department_id = e.department_id; -- p_error := v_error_msg; -- EXCEPTION -- WHEN OTHERS THEN v_error_msg := SUBSTR(SQLERRM,1,200); END get_employees; -- END search_app; / sho error --- here is the stub I am using to test. -- set serveroutput on size 1000000 spool search_app_OR.log -- DECLARE -- v_first_name_search hr.employees.first_name%TYPE; v_last_name_search hr.employees.last_name%TYPE; v_job_id_search VARCHAR2(100); my_emps search_app.emp_curs; -- v_first_name hr.employees.first_name%TYPE; v_last_name hr.employees.last_name%TYPE; v_job_id VARCHAR2(100); v_salary hr.employees.salary%TYPE; v_dept_name hr.departments.department_name%TYPE; v_error_msg VARCHAR2(200); -- v_count PLS_INTEGER; -- BEGIN -- v_first_name_search := '%'; v_last_name_search := 'De%'; -- v_job_id_search := '%'; v_job_id_search := chr(40)||chr(39)||'AD_VP'||chr(39)||','||chr(39)||'SH_CLERK'||chr(39)||chr(41); -- search_app.get_employees(p_last_name_search => v_last_name_search ,p_first_name_search => v_first_name_search ,p_job_id_search => v_job_id_search ,pr_emps => my_emps ,p_error => v_error_msg ); -- LOOP -- FETCH my_emps INTO v_last_name, v_first_name,v_job_id, v_salary, v_dept_name; EXIT when my_emps%NOTFOUND; -- DBMS_OUTPUT.PUT_LINE ('...last_name : '||v_last_name); DBMS_OUTPUT.PUT_LINE ('...first_name: '||v_first_name); DBMS_OUTPUT.PUT_LINE ('...job_id : '||v_job_id); DBMS_OUTPUT.PUT_LINE ('...salary : '||v_salary); DBMS_OUTPUT.PUT_LINE ('...dept : '||v_dept_name); DBMS_OUTPUT.PUT_LINE ('...error_msg : '||v_error_msg); -- END LOOP; -- v_count := my_emps%ROWCOUNT; -- CLOSE my_emps; -- DBMS_OUTPUT.PUT_LINE ('v_last_name_search : '||v_last_name_search); DBMS_OUTPUT.PUT_LINE ('v_first_name_search : '||v_first_name_search); DBMS_OUTPUT.PUT_LINE ('v_job_id_search : '||v_job_id_search); DBMS_OUTPUT.PUT_LINE ('num rec fetched : '||v_count); -- EXCEPTION WHEN OTHERS THEN v_error_msg := SUBSTR(SQLERRM,1,200); DBMS_OUTPUT.PUT_LINE ('error: '||v_error_msg); END; / spool off
When I OR in the request for get_employees for search parameters, 106 records are returned.
When I AND in the application, not of records returned is 0. It should return 2 records. Why is it not return all records? Any suggestion on how this procedure should be applied?
Thank you
Raman
Published by: rxshah on June 8, 2010 12:52 AMHello
The problem is that you try to implement a dynamic list in a static SQL statement:
job_id IN '(''AD_VP'',''SH_CLERK'')'
It will not work like that.
Check out these links for some tips:
http://tkyte.blogspot.com/2006/06/varying-in-lists.html
http://asktom.Oracle.com/pls/asktom/f?p=100:11:1242571115131928:P11_QUESTION_ID:110612348061 -
Advanced search and replace. How to replace the space with carriage return?
10.9.13.0/24, 10.9.4.2/32, 10.9.4.3/32 in
10.9.13.0/24
10.9.4.2/32
10.9.4.3/32Find replace them ',' with carriage return.
I still find articles on an advanced search and replace, but I can't seem to locate it.
OS X El Capitan 10.11.3
3.6.1 the numbers
HI Brendan,
You don't need an advanced find and replace for it.
In the search box, press, then space.
In the box replace by, press option-return.
Then click Find and replace and find until you are finished.
Kind regards
Barry
-
Is it not possible to get (or use) a search string that includes a reference object?
Hello world
I try to get the full search string property for the property "xl" seen below at the bottom of the image.
I can go as far as the other results [0] (which is a reference), but after that, it seems not possible to access the "xl".
"TS. SequenceCall.ResultList [0]. TS. SequenceCall.ResultList [0]. TS. SequenceCall.ResultList [0]. "AdditionalResults [0].
If I get the interface for the object of 'xl' and then ask 'place' in what concerns the "MainSequenceResults", I get an empty string.
Get the property for container objects and properties in the object "xl" also give the same result when I call «GetLocation (...)» with the MasterSequenceResults the TopObject property.
Is it not possible to have a search string that includes a reference object?
Thank you
Ronnie
Hi Ronnie,.
It is possible, but to get this value, you can use the TestStand API. I have attached a sequence file that shows how to get the values of reference of object using AsPropertyObject, and then the associated GetVal method. It is much easier to understand with an example. Let me know if you have any questions about the sample file of sequence.
-
How to search string in the window layout and paste it inside the element?
I'm new to indesign to animals. Learn extendscript for automation.
I need to paste a string copied instead of '< media >' element in the window layout like the image below.
But I do not know how findgrep in window(ctrl+y) layout rather than the editor.
I have a script to copy - paste into the active document at the specific position of specfic chain. But, I need to glue between the element of "< media > < / media > '."
For example:
If search string = "FIG. 1.1", so I want the copied string to be pasted into the document as below
WINDOW LAYOUT:
< media.block id = "001" Fig. > < media > < / media >
< caption aid: pstyle = "Caption" > < num > FIG. 1.1 & #x2002; < / num >
< para > < txt > the range of disciplines engaged in research and development
in the field of nanoscience and technology. < / txt > < / para > < / legend > < media.block >
OUTPUT:
< media.block id = "Fig001" > < media > * PASTE STRING * < / media >
< caption aid: pstyle = "Caption" > < num > FIG. 1.1 & #x2002; < / num >
< para > < txt > the range of disciplines engaged in research and development
in the field of nanoscience and technology. < / txt > < / para > < / legend > < media.block >
I have a script to paste into the current document rather than the window layout.
App.Open (file (myFigDoc));
app.activeDocument.pageItems.everyItem () .select ();
App.Copy ();
app.activeDocument.close ();
app.findGrepPreferences = app.changeGrepPreferences = null;
var figString = "FIG." + chapno + "'." + j; "
app.findGrepPreferences.findWhat = figString; Figure legend text
app.findGrepPreferences.appliedParagraphStyle = "FigureCaption"; Figure caption Style
myFinds = app.activeDocument.findGrep ();
for (var i = 0; i < myFinds.length; i ++) {}
myFinds[i].insertionPoints[0].contents="\r ';
myFinds [i] .insertionPoints [0] .select ();
App.Paste ();
}
How do in the window layout?
Try this,
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT; var myDoc = File("/D/template-sample.indd");//Figure File var myFigDoc = File("/D/fig1.indd");//Destination File app.open(File(myFigDoc)); app.activeDocument.pageItems.everyItem().select(); myObj = app.selection; app.copy(); app.open(File(myDoc)); app.findGrepPreferences = app.changeGrepPreferences = null; app.findGrepPreferences.findWhat = "FIG. 1.1";//Figure caption text app.findGrepPreferences.appliedParagraphStyle = "Caption";//Figure Caption Style myFinds = app.activeDocument.findGrep(); alert(myFinds.length) for(var i=0;i
-
File save to preserve search and replace queries when reinstalling?
I need to uninstall and reinstall CS6. I have a large number in search and replace queries that would be extremely difficult to redefine. How do I save these as well as other features such as the areas of work or Actions in PhotoShop?
Your saved queries find/replace are in a folder in your library to the user or the user's profile (depending on your operating system). You can find the path to where they are stored in the information provided for the InDesign Defaults file to replace your preferences. The folder queries saved is in the same folder as the InDesign Defaults file. Note that this is a HIDDEN on all recent operating systems folder.
There was also a case of workspaces in the same place for ID. Similar records should be found for other programs under their respective application folders to the same location of the user's library/profile.
-
Boolean search string limitation
When we enter a search string more than 10 words to Boolean searching for example chicken gun to GOLD OR ask brother GOLD flooding of the housing or the curry house GOLD OR GOLD OR fish Apple GOLD dog OR bird OR duck OR the request fails. Is there a way to fix this?
You get an error message? Or not the query returns simply no result?
There is a dgraph flag that controls the maximum number of terms to assess when a search is called search_max. This default value is 10, which makes me think that she might be related to your problem. In a standard search mode, I thought it all starts with the 11th ignored word but Boolean may behave differently.
If you try to add a - search_max 20-your dgraph and test again, I would be curious what your results are.
Patrick Rafferty
-
GREP: Search and replace
Does anyone know if its possible to take a list (shown on the lower part of the image) and run a GREP search and replace to create the list of tabs (shown on the picture)?
I know that the majority of it can be made with the regular search and replace: separate the first and last name; MD and MD #; Postal code and telephone number.
What I was not able to understand is how to add a tab forward and backward the state abbreviations 2-digit, the Middle Initial, phone number and more important even if there is a way to add tabs in when there aren't the same amount of lines, such as the field of specialty.
I know that I can use the GREP search and replace to add a tab before each paragraph back, then remove the tab where there are 2 paragraph after each game returns, then substituting a tab and a paragraph back to just a tab, together running all the rows in each set.
Any help would be greatly appreciated, and if there is anywhere I can learn more about GREP, I would love to learn it.
Thank you
Peter
Peter, try this...
Find:------.<>
Replace: \t$0
-
Search and replace for the color gradients?
Just discovered new "Find and replace" tool which is very neat. However, I can't make it work with gradients. "Finding" a specific gradient if you replace all the forms with that color with another color United or degraded degraded? (Using Flash CS6; although entry users of old versions of Flash welcome whether applicable...)
Hi Evilbob0,
Search and replace for color, supports only solid colors.
Gradients are not supported (in - Flash Pro CS6 and CC).
Thank you
Smriti
-
GREP: date/time search and replace
Hello world
I frequently import XML files into InDesign. The XML structure always contains the following, among others:
start date
start time
end date
end time
For example, it looks like this:
21.08.2013
09:00
25.08.2013
18:00
Now, I need to reorder these fields in a single line, like this:
21.08.2013, 25.08.2013, 09:00-18:00
I already found a way to do it through GREP, but I need to go one step further:
If the "start date" and "end date" is the same (for example, both are "21.08.2013"), I would like to move the "end date" in the output. It should look like this:
21.08.2013, 09:00 - 18:00
Is it possible to do it through GREP?
Thanks in advance!
This will do
Trevor
// By Trevor http://forums.adobe.com/thread/1261365?tstart=0 app.doScript("formatDates ()", ScriptLanguage.javascript, undefined, UndoModes.ENTIRE_SCRIPT, "GREP: date/time search and replace"); function formatDates () { app.findGrepPreferences = app.changeGrepPreferences = null; app.findGrepPreferences.findWhat = "\\d\\d\.\\d\\d\.\\d\\d\\d\\d\r\\d\\d:\\d\\d\r\\d\\d\.\\d\\d\.\\d\\d\\d\\d\r(?=\\d\\d:\\d\\d\r)"; var doc = app.activeDocument, dateFinds = doc.findGrep(), l = dateFinds.length, dates; while (l--) { app.findGrepPreferences.findWhat = "(\\d\\d\.\\d\\d\.\\d\\d\\d\\d)"; dates = dateFinds[l].findGrep(); app.findGrepPreferences.findWhat = "(\\d\\d\.\\d\\d\.\\d\\d\\d\\d)\r(\\d\\d:\\d\\d)\r(\\d\\d\.\\d\\d\.\\d\\d\\d\\d)\r"; if (dates[0].contents == dates[1].contents) app.changeGrepPreferences.changeTo = "$1 $2 - "; else app.changeGrepPreferences.changeTo = "$1 $2 - $3 "; dateFinds[l].changeGrep(); } }
Maybe you are looking for
-
So, I bought a slightly used Elite x 2 G1. The pen shows nothing when I tried to pair (without coupling light and no reaction from the pen app). So I changed the AAAA batteries. Still nothing. So I searched the documentation. None anywhere. But t
-
Performance issues with Vista on Satellite L40 - 14N
I just signed up to your forum, it's really nice, how it works.I bought 3 months ago, a satellite L40-14N, with Vista Home Premium pre-installed, but I'm starting to get tired of the delays.I also have a problem, always Walker I want to open some win
-
Microsoft Sidewinder mouse macros
I have a Sidewinder mouse, and sometimes, mid-game, a macro will be saved and somehow assigned to my right mouse button. I can say that I'm not hitting the button Macro record once (not to mention twice, then it will stop recording), and I'm CERTAINL
-
I run vista on my laptop, but want to play the old games that need XP. I was told on the microsoft site a xp free download that you can run on the computer next to vista (when the computer starts, you have possibility to xp or vista to run) to play w
-
transfer the processor again motherbaord is possible?
can someone help me?