Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
0 votes
1 answer
52 views

Regex failure despite valid regex when creating GeoServer Image Mosaic

I'm attempting to create an ImageMosaic on GeoServer with various custom regex files. I am letting GeoServer create a shapefile index for me. I'm using the example GeoTIFFs from this GeoServer ...
0 votes
1 answer
44 views

Using regular expressions to select multiple variables for a function in GEE

In GEE I'm using Awesome GEE's ESRI LULC Dataset to map out and mask water areas for the years 2017 to 2022. Due to it being an Image Collection of multiple dynamic years, I had to filter, mosaic, and ...
1 vote
2 answers
60 views

String function to shorten a string value

In QGIS, I'm trying to create a new variable with a short description of a string value of another variable. For example, in the table below, I would like to have: NAMEABB = "US 1" when NAME ...
1 vote
0 answers
47 views

QGIS layer filter doesn't work if there is an other condition next to a regexp one

I have layer in qgis. It has an attribute data_count (Integer) and a value (String). When I filer for "value" ~ 'maximum-speed-limit' it works. When I filter for "data_count" > ...
0 votes
1 answer
777 views

Removing repeated commas with ArcGIS Survey123

I have created a form in ArcGIS Survey123. I have several field where you can enter multiple numbers from a select_multiple question. I then want to put all of those numbers into a single string. So I ...
9 votes
4 answers
4k views

Use field calculator QGIS: if value in one column, then value in new column

I am having troubles using the field calculator to get what I want. One column in my attribute table is named 'Taxa' and has a set of species in it. Species are separated by #. I want to make a new ...
1 vote
1 answer
270 views

Replacing spaces between a number and its unit using regexp_replace [duplicate]

In QGIS attributes I have text strings that sometimes include a measurement as part of descriptions, "such as cut at 10 m". In order to make these look nice when presented in multiline fixed ...
4 votes
2 answers
518 views

Capturing all matches (occurences) with QGIS regular expressions

Problem I use QGIS with the expression function regexp_matches() that returns an array of all strings captured by capturing groups. Regular expressions normally capture only the first match (occurence)...
4 votes
2 answers
360 views

Moving substring from end to beginning of string in QGIS Attribute table

I have a large data set that contains a time range in the format 00:00-00:00 and 1-6 three-day abbreviations of days of the week (MON, TUE, WED, etc.). I managed to get all the time ranges and day ...
2 votes
1 answer
263 views

Extracting or selecting only 4 digit numbers from attribute field

I have a field, this field has integer numbers, what I need is to find only the 4 digit numbers and select/extract them. I do know a few solutions but they didn’t work out. What exactly I want to do ...
1 vote
0 answers
242 views

Domain in gpkg QGIS

I try to set the field domain for GeoPackage table fields. (description in : see qgis changelog) I want but I can't use glob domain (with regex constraint), I try many syntax in pattern : '[A-Z]' , &...
1 vote
1 answer
74 views

Regex substr - Extracting number after specific text sequence

Couldn't find any solution to a specific sequence. Context: italian cadaster, where plot number is embedded in a table coded in kml, in the "description" field. I want to extract the plot ...
3 votes
1 answer
356 views

Split a text string with each character as an element of an array with QGIS expressions and regular expressions

I want to use QGIS expressions to split up a text string to an array with each element representing one character of the input's string, like: input: mytext -> ouput: [ 'm', 'y', 't', 'e', 'x', 't' ...
3 votes
2 answers
143 views

Inserting space between address and cardinal direction in QGIS

I have a shapefile, which is a parcel map. Its table of contents has a column containing the addresses of several buildings. Some of the addresses hold directional information (i.e. n, s, w, e). The ...
3 votes
2 answers
86 views

Setup QGIS Display name to return only unique values from a search

In QGIS I am trying to setup the Locator to return a matching Street Entry from the attribute table as opposed to all matching without creating a new merged layer. In the Display Expression, I tried ...
0 votes
2 answers
225 views

Identify and split data in other languages using QGIS

I have a dataset containing names in both English and other languages and mixed too. Is their any way to remove data containing other than English language? Eg:
4 votes
2 answers
401 views

Allowing only numbers in table field and preventing saving anything else using shapefiles in QGIS

I have a shapefile in which I want to allow only numbers in a table field. For this I have inserted the following expression in Properties > Attribute Form> Constraints (see Screenshot). not ...
2 votes
1 answer
93 views

MapInfo SQL Query with Metacharacters?

I have +8 million edge in MapInfo. I want to select character+digit but I can't. I tried querying as [a-z]+[0-9] but failed to use metacharacters in MapInfo. "New York 1. Street" is true. &...
3 votes
3 answers
650 views

How to populate one column of a table by extracting the match of a Regular Expression?

I Have a CSV table where one of the columns has names of the post offices with the type given in brackets like this: Sri venkateswara puram (Sub Office) I want to extract the post office type, by ...
7 votes
2 answers
3k views

Extracting text within parenthesis in a QGIS attribute table

I have a shapefile of data for Japan, and I need to extract the English character names in my "name" field in order to label the layer. Much of the data is all in Japanese, but some of the names have ...
3 votes
5 answers
1k views

Extracting digits from string in QGIS

I have a string field that I want to extract only the digits example: 1,500 m2 -> 1500 I've tried with regexp_substr("location", '(\\d*)') to remove all after the blank space, but I need ...
2 votes
2 answers
347 views

Identify and move data containing special characters to a separate column

My dataset contains special characters. I want to identify the data which contains special characters and separate it into a new column. List of special characters : `~!@#$%^&*_{}[]<>?/ ...
5 votes
1 answer
278 views

Filtering list of data mixed with both full capital letter words and small letter words in QGIS

My dataset contains mixed values of both capital and small letter wordings, e.g. Hello world (contains fully small letter wording 'world') HELLO World (contains fully capital letter wording 'HELLO') ...
1 vote
1 answer
157 views

Replacements QGIS/Excel

I have a field filled with expressions like these: 'Xm1 to Xm2'; 'Xm2 to Xm1'; 'Xm19 to Xm20' And I also have an imported Excel table with the correspondet text to replace Xm1, Xm2, Xm(n), ..., Xm20. ...
3 votes
2 answers
331 views

Removing data existing in a closed brackets

I have a dataset that contains a number of closed brackets with data. I don't want the data which exists in the brackets. How can I remove that in QGIS? Mcdonalds(Park Avenue) KFC (Park Avenue) ...
7 votes
3 answers
669 views

Expression to replace characters in QGIS Attribute table

I have a string field. Which requests to put the letter F after the number to all positive digits, and the letter B after minus digits and to delete the sign -. Finally, I want a result like this:
2 votes
4 answers
612 views

Matching backslash with regex in QGIS Field Calculator

I'm attempting to remove a part of string in an attribute column of a shapefile. The part in question is Snapshots\\ from Snapshots\390_measure_1.jpeg. So I want the output to be 390_measure_1.jpeg. ...
5 votes
4 answers
2k views

Removing unwanted data in the cell of the QGIS Attribute table

How can I remove remove data after any special character in the cell using QGIS? E.g.: Valli Amman Mandir, Chettiyakotai I want only Valli Amman Mandir in the cell. The rest should be removed.
9 votes
1 answer
254 views

Regex_replace in the Field Calculator: unexpected duplication of replacement elements

After testing things out for a different question, I found something unexpected about the way regex_replace works in the Field Calculator, compared to PostgreSQL. The suggested insert ends up ...
2 votes
4 answers
192 views

QGIS regular expression while importing delimited text

I have a CSV file with following format : UTC,Callsign,Position,Altitude 2021-05-11T11:44:38Z,FABCD,"28.084,7.452",500 ... So I can't import with personalized delimiters. I tried to use ...
4 votes
2 answers
589 views

Regular expression delimiter for text file in QGIS 3

I have a text file containing coordinates but also comment lines such as : #file description #description point 1 id1 X1 Y1 Z1 #description point 2 id2 X2 Y2 Z2 and I want to import this file in ...
0 votes
0 answers
33 views

Repetitions on regexp_replace [duplicate]

I'm using regexp_replace to replace expressions like 'Xm1 and Xm2'but also 'Xm11 and Xm2' or 'Xm22 and Xm11' with a text i have on a spreadsheet; Basically i want to make a VLOOKUP on Qgis between the ...
0 votes
2 answers
277 views

Regexp_replace a number only when appears alone [closed]

I want to use regexp_replace expression to replace some numbers within a expression, but only when this numbers appear alone. For exemple: If have the expression '1 and 2' I want it to replace for 'B3 ...
2 votes
3 answers
880 views

Rasterize: burning string values into raster (string to real) (QGIS)

I have to rasterize a polygon layer. Unfortunately the values of the field I have to burn into the raster has a variety of string entry's like "L239x" or "a403" (case sensitive!). RAT (Raster ...
3 votes
3 answers
480 views

Remove symbols from text with field calculator

I'm attempting to remove € symbols from values in the attributes of a geopackage. For example, I have a value 240 123€ that I want to turn into 240 123. I'm using the field calculator to do this. So ...
5 votes
2 answers
531 views

QGIS Field Calculator - Remove text inside multipe parentheses from a string

On the QGIS Field calculator, I am trying to remove from a string the text that is inside parentheses using regexp_replace. While it is not a problem to remove the text from a string that contains ...
4 votes
1 answer
436 views

Filter array with a field value

I need to filter filenames (like DJI_0147_3_5.jpg) in an array, and the code below works, but, where you see a 3 in regex, I need instead a field value. In the array output (sourcefile field) we have ...
0 votes
1 answer
181 views

QGIS Regex expression label

I'm trying to use regex expression to label my layer in order to show the parcel number. Here is some examples of what i'm looking for : From this "53042A0027/00M002", to "A27M/2" ...
3 votes
2 answers
415 views

Replace all but coordinates from a WKT string, including closing bracket ')'

To get a list of coordinates from a polygon and remove unwanted parts from the resulting string, the following expression works fine to remove the string elements 'Polygon', spaces and opening ...
5 votes
2 answers
248 views

QGIS defining the nth character where the label could be wrapped

I have the labels, which include a few of the same characters "/". Unfortunately, I cannot simply use the "Wrap on character" option, because it wraps everywhere where this ...
5 votes
2 answers
906 views

Replacing '.' and '-' in column values with empty space '' in QGIS

I have a shapefile that has a column named "SBL" with string values that contain points (.) and hyphens (-). However, I want to remove these points and hyphens, but so far I haven't been ...
1 vote
1 answer
5k views

Conditional Question on Survey123 Connect

In ArcGIS Survey123, I want my next question to appear based on to the previous question answer. I tried the expression ${previous_question} = 'true' however I don't seem to get it right. When I ...
4 votes
2 answers
953 views

Replace using regular expression in QGIS: how to mask a dot (point)?

In QGIS, I have a string with the pattern (1 character)(1 character)(dot)(number with 1 or more digits). How can I use regexp_replace() to get the number only? I tried regexp_replace('ab.27',('(\\D\\D(...
2 votes
1 answer
643 views

Regex to replace English Characters to Arabic by QGIS

I have a challenge to replace English content which comes from AutoCAD annotation to Arabic characters, Arabic fonts for AutoCAD like xarab store Arabic content as English, I just need to replace ...
4 votes
2 answers
1k views

Regular expressions within QGIS expressions: logical operator AND

Context I use QGIS expressions and want to use regular expressions to identify those strings that contain two words. It's easy to identify those features of the field text that contain both QGIS or ...
7 votes
1 answer
780 views

Combining two types of conditions to replace strings with regular expressions in QGIS

I have a string with commas at the beginning, at the end and sometimes two or more commas after each other: ,,, as can see at the bottom. I tried to remove the commas in a way to have a comma ...
3 votes
1 answer
3k views

Removing part of string from the right in QGIS

I am trying to remove the last piece of my string in QGIS. I want to delete the E10 from the end. I tried both: How to easily edit attribute data using Regular Expressions? regexp_replace("UPRN&...
6 votes
3 answers
2k views

Extract left part of field with regexp_substr after two specific charaters

I would like to create a new field on my table with only the part at the end of another field ("stop_name") which contains things as 'STOP_01_1_S1'. I want to extract what is on the right of ...
5 votes
3 answers
392 views

Splitting string with house number in QGIS Field Calculator

I have a string field with housenumber which contains values like: housenumber 5 12 a 15 b 18 c What are the right expressions for the field calculator to write only the number in "field1&...
9 votes
4 answers
17k views

Extracting text before first slash "/" in QGIS

I have a database of motorway junctions which are named like this: M90 J8/A91/B996 M90 J1/A90/A921/A985(T) M9 J1A There is significant variability in the length of the strings but they all follow ...