Questions tagged [regex]

a regular expression (abbreviated regex or regexp) is a sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations.

Filter by
Sorted by
Tagged with
2 votes
1 answer
2k views

Regular expression to match all numbers in comma-separated list in FME

In FME, I have a Feature Type with municipalities and their IDs, and a string attribute made of an unknown number of these IDs, separated by commas, like for example: 5586,5587,3468,9942 The goal is ...
Voxem's user avatar
  • 23
1 vote
1 answer
619 views

Using regex to find an attribute with no letters in FME Workbench

I need to divide address elements to lines. I am using 'TestFilter' transformator in FME Workbench to separate attributes with no letters. For this purpose I am using IF statement and regular ...
MetalMuzu's user avatar
9 votes
4 answers
15k 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 ...
Ed Rollason's user avatar
  • 3,808
7 votes
2 answers
2k 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 ...
Christy Heaton's user avatar
0 votes
1 answer
215 views

Installing mapserver in cygwin with regex.c

This is my first time installing mapserver in cygwin, but I am an experienced user of both cygwin and mapserver. The thing is that I'm getting a regex issue after doing cmake in the build directory ...
Gery's user avatar
  • 2,122
2 votes
1 answer
1k views

How can I use regex in the AttributeCreator Advanced Editor in FME 2014?

I want to use regex to simply distinquish between POLYGON and MULTIPOLYGON using the regex term "\bPOLYGON" Apparently I can use the Advanced Editor and use @FindRegEx(<STRING>,<STRING>)...
Robert Buckley's user avatar
3 votes
1 answer
516 views

Best way to enforce valid table names when writing to a File Geodatabase

I have an FME Workbench which reads MapInfo files and writes them to a File Geodatabase. Generally, the workbench works pretty well, however, I've just come across an error which I though would have ...
Fezter's user avatar
  • 21.7k
4 votes
1 answer
275 views

New attribute creation using ogr and regex

I've got a folder full of dxf files with elevation values included as part of a long text attribute. I've written a regex expression to extract the elevation value, and would like to add it as a new ...
tomtomnz's user avatar
  • 595
1 vote
1 answer
2k views

QGIS Regex substring for Labelling

I'm trying to plot a series of contours in QGIS based on dxf data exported from some specialised mining software. The attirbute output is pretty ugly and merges a few fields together. DXFName=C$5 ...
tomtomnz's user avatar
  • 595
1 vote
2 answers
658 views

Writing QGIS regex for rounding to two places after decimal point?

In QGIS field-calculator round() is not working in QGIS 1.8 so I try to do the following with a regex: I'd like to keep the first two places after the decimal point - where do I go wrong? ...
Kay's user avatar
  • 1,836
9 votes
6 answers
14k views

Creating label formatted like " 1,000' " from numeric field?

This question builds on a previous question I came across at gis.stackexchange: How to easily edit attribute data using Regular Expressions? Perhaps someone can point me in the right direction? I ...
clhenrick's user avatar
  • 1,775
3 votes
1 answer
2k views

VBscript Regular Expression in ArcMap Field Calculator

I'm looking for a regex in VBscript that I can use on a ArcMap table. I know what it would look like in python: pat =r'[0-9]{3,4}' This filters all numeric characters from the string which have the ...
LarsVegas's user avatar
  • 2,496
2 votes
2 answers
1k views

Implementing field validation rules in ArcGIS?

I've found that ArcGIS offers validation of 2 basic constraints: field data type and if the value is required or not. Is there any way or AddIn to attach more complex validation rules? I mean ...
megadrofan's user avatar
2 votes
1 answer
465 views

OpenLayers.Format.CQL Regex Problem

I have a cql filter as SQL. Im trying to parse this cql to OpenLayers.Filter using OpenLayers.Format.CQL.read() method. It all works fine since my input is ascii. When I type Turkish characters as ...
ademozay's user avatar
7 votes
2 answers
2k views

selecting by attribute and specific value replace

I want to select all of the features by attribute where the attribue in myattrib is like... Selection "criteria H". That is not a problem. However then I need to replace (myattrib," H", "") except ...
Brad Nesom's user avatar
  • 17.4k

1
2