How add separator or remove characters with regex?

Describe the problem.
With text selector in some cases extract data joined.
Can I separate the terms with regex adding an separator? or How can I stop them from joining? How control this?
The text is show in table format but are in different divs, when I try to get separately I only get the title or null.

Selector Text
.field-name-field-product-attributes-n
Result:
PresentationBox MaterialPlastic Weight100 kg

If use Selector Group
.field-name-field-atributo-reference-n, div.group-atributo-valor

Result:
[{"ct":"Presentation"},{"ct":"Box"},{"ct":"Material"},{"ct":"Plastic"},{"ct":"Weight"},{"ct":"100\n\n \n kg"}]

With selector Group have terms separately but with json format.
The way to join multiple selectors is only with the group selector
s1, s2 with text selector not join or get null.

For remove characters with regex, finally I got one, to remove title:

Code SKU: 190Y45

use [A-Z0-9][\w ]+$ and the result is 190Y45 and it seems to work with any length, Is this correctly expressed?

And for remove € and space from a price, how would it be? 36,75 € to 36,75

Hard to diagnose without sample data or url.

You can scrape the same selector repeatedly and just use different regex for each field you want.

For the SKU, this regex should work:
(?<=SKU: )[\w]+$

[\w] already means any "word" character so [A-Z0-9] is not needed.

1 Like

Hi!

Please help me.
I want remove this:

42 900 Ft (-27%) -> 42 900