[[TranslatedPages]] = Search = [[Image(source:trunk/images/dialogs/search.png,middle)]] ''Keyboard shortcut'': '''{{{Ctrl+F}}}''' '''Search [wiki:/Help/Concepts/Object objects] in the current data layer using query language'''. This tool have different look, depending on your expert setting: Search action will respect current [Help/Dialog/Filter filters] meaning it wouldn't return any of filtered objects. Hover over keyword in search menu to get textual explanation with simple example! [[br]] [[Image(9229-search-expert-false-with-tooltip.png)]] == Expert mode == In [Help/ExpertMode expert mode], the following options are added: - more keywords listed (they work also in non-expert mode, but are hidden in the dialog) - '''standard/regular expression/MapCSS selector''' radio button, see sections below for details - '''add toolbar button''' covered in section [Help/Action/Search#SavesearchqueryinMaintoolbar] [[Image(9229-search-expert-true.png)]] == Examples == Some examples of queries: * `type:way` selects all ways * `name:Herrengasse` selects all elements with the given name * `name=Herrengasse` same as above, but case sensitive * `"name"="Baker Street"` same as above, but works also with special characters like white spaces in the value * `tag1=yes tag2=yes` is equivalent to `tag1=yes & tag2=yes` * `type:way name:-` selects all ways that do not have a name * `id:123465678` selects an object (way or node) with a particular id * `timestamp:2010-11-01/2010-12-01` selects object with last change in November 2010 * See also [[Help/Dialog/Filter#Examples]] == Save search query in [wiki:Help/MainToolbar Main toolbar] == To ''save search as a button'' if you check '''add toolbar button''' checkbox, as soon as you click on [[Image(source:trunk/images/dialogs/search.png,middle)]] '''Start Search''', a button will be added to the Main Toolbar. which will execute the defined search expression each time, you press the button. [wiki:Help/Preferences/Toolbar#Previouslysavedsearchresults Toolbar Customization will let you modify icon, search query and an icon]. As with any "button" [Help/Preferences/Shortcuts you can always assign shortcut to it]. == Regular expressions == JOSM supports [http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html Java regex syntax]. == MapCSS syntax == See [wiki:Help/Styles/MapCSSImplementation]. == Fetch external file and replace selection == A very under-used feature that lets you enter a web URL (`file://`, `http://`, `https://`, `ftp://`) in the search field. JOSM will then attempt to load that URL, and select any objects that it finds referenced in that file. JOSM will look for XML tags "way", "node", and "relation" in the document (clarify? examples?), and use their id attribute . You can access another OSM file on your hard disk this way and have JOSM select all objects that are present in the file (provided they are present in JOSM's dataset too). Similar thing is possible [wiki:Help/CommandLineOptions via command line parameter during JOSM start-up]. Similar thing is possible via Remote control command. == See also == * [Help/Dialog/Filter] allows you to save and combine multiple search patterns between your JOSM sessions ---- Back to [wiki:/Help/Menu/Edit Menu Edit][[Br]] Back to [wiki:/Help Main Help]