In Qgis Replace a '+' with a ', ' for labels
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I want to replace a '+' with ', ' to label an attribute looking like "ZT10+ZT20+ZT30" to get "ZT10, ZT20, ZT30" using
regexp_replace("zone_nr", '+', ', ')
but I get an Eval Error: Invalid regular expression '+': quantifier does not follow a repeatable item.
qgis replace
add a comment |Â
up vote
1
down vote
favorite
I want to replace a '+' with ', ' to label an attribute looking like "ZT10+ZT20+ZT30" to get "ZT10, ZT20, ZT30" using
regexp_replace("zone_nr", '+', ', ')
but I get an Eval Error: Invalid regular expression '+': quantifier does not follow a repeatable item.
qgis replace
1
Have you triedreplace("zone_nr", '+', ', ')
?
– Taras
6 mins ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want to replace a '+' with ', ' to label an attribute looking like "ZT10+ZT20+ZT30" to get "ZT10, ZT20, ZT30" using
regexp_replace("zone_nr", '+', ', ')
but I get an Eval Error: Invalid regular expression '+': quantifier does not follow a repeatable item.
qgis replace
I want to replace a '+' with ', ' to label an attribute looking like "ZT10+ZT20+ZT30" to get "ZT10, ZT20, ZT30" using
regexp_replace("zone_nr", '+', ', ')
but I get an Eval Error: Invalid regular expression '+': quantifier does not follow a repeatable item.
qgis replace
qgis replace
asked 16 mins ago
Lukschn
364
364
1
Have you triedreplace("zone_nr", '+', ', ')
?
– Taras
6 mins ago
add a comment |Â
1
Have you triedreplace("zone_nr", '+', ', ')
?
– Taras
6 mins ago
1
1
Have you tried
replace("zone_nr", '+', ', ')
?– Taras
6 mins ago
Have you tried
replace("zone_nr", '+', ', ')
?– Taras
6 mins ago
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
3
down vote
A +
is a special symbol to the QGis regular expression engine (it means 1 or more of the preceding character), so you need to escape it by putting a in front of it. So you need:
regexp_replace("zone_nr", '+', ', ')
add a comment |Â
up vote
2
down vote
Or, simply use
replace("zone_nr", '+', ', ')
as this doesn't expect a regexp term (it simply matches all occurences of the specified input string).
add a comment |Â
up vote
1
down vote
You can input regular expression to find any single +
like .+
regexp_replace("zone_nr", '.+', ', ')
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
A +
is a special symbol to the QGis regular expression engine (it means 1 or more of the preceding character), so you need to escape it by putting a in front of it. So you need:
regexp_replace("zone_nr", '+', ', ')
add a comment |Â
up vote
3
down vote
A +
is a special symbol to the QGis regular expression engine (it means 1 or more of the preceding character), so you need to escape it by putting a in front of it. So you need:
regexp_replace("zone_nr", '+', ', ')
add a comment |Â
up vote
3
down vote
up vote
3
down vote
A +
is a special symbol to the QGis regular expression engine (it means 1 or more of the preceding character), so you need to escape it by putting a in front of it. So you need:
regexp_replace("zone_nr", '+', ', ')
A +
is a special symbol to the QGis regular expression engine (it means 1 or more of the preceding character), so you need to escape it by putting a in front of it. So you need:
regexp_replace("zone_nr", '+', ', ')
answered 10 mins ago


Ian Turton♦
45.6k544106
45.6k544106
add a comment |Â
add a comment |Â
up vote
2
down vote
Or, simply use
replace("zone_nr", '+', ', ')
as this doesn't expect a regexp term (it simply matches all occurences of the specified input string).
add a comment |Â
up vote
2
down vote
Or, simply use
replace("zone_nr", '+', ', ')
as this doesn't expect a regexp term (it simply matches all occurences of the specified input string).
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Or, simply use
replace("zone_nr", '+', ', ')
as this doesn't expect a regexp term (it simply matches all occurences of the specified input string).
Or, simply use
replace("zone_nr", '+', ', ')
as this doesn't expect a regexp term (it simply matches all occurences of the specified input string).
answered 6 mins ago


ThingumaBob
4,9581222
4,9581222
add a comment |Â
add a comment |Â
up vote
1
down vote
You can input regular expression to find any single +
like .+
regexp_replace("zone_nr", '.+', ', ')
add a comment |Â
up vote
1
down vote
You can input regular expression to find any single +
like .+
regexp_replace("zone_nr", '.+', ', ')
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You can input regular expression to find any single +
like .+
regexp_replace("zone_nr", '.+', ', ')
You can input regular expression to find any single +
like .+
regexp_replace("zone_nr", '.+', ', ')
answered 1 min ago


Oto Kaláb
3,76431329
3,76431329
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f299672%2fin-qgis-replace-a-with-a-for-labels%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Have you tried
replace("zone_nr", '+', ', ')
?– Taras
6 mins ago