Page 1 of 1

regexreplace issues I'm having

Posted: 11 Mar 2021 15:12
by sweet40
hey all...

for an input like
U$ 199,90
U$ 19,99

item 1
U$ 9,90
U$ 1,98

item 2
U$ 13,90
U$ 2,98

item 3
U$ 7,90
U$ 0,98

item 4
I'm trying to get a flat list like
item 1, item 2, item 3, item 4
using this

Code: Select all

$in = regexreplace(<clipboard>, "^" . "[\\U]" . "[\\$ ]" . ".+", ", "); text "$in";
but failing and I can't see why.

then I'd like, from this input
item 1
item 2
item 3
item 4
to have it added of items, this being the result
item 1 (price= U$/user rating //comments: ...//[age rating: {USA}, {EU})
item 2 (price= U$/user rating //comments: ...//[age rating: {USA}, {EU})
item 3 (price= U$/user rating //comments: ...//[age rating: {USA}, {EU})
item 4 (price= U$/user rating //comments: ...//[age rating: {USA}, {EU})
and I have no clues on how. help, please...

Re: regexreplace issues I'm having

Posted: 11 Mar 2021 15:21
by highend
item 1, item 2, item 3, item 4
Show the real expected output^^

and no clue what you're expecting on the second...

Re: regexreplace issues I'm having

Posted: 11 Mar 2021 16:33
by sweet40
I'm seeing I'll have to spend the next weeks fixing some tables varying from software to shop lists so whatever it fills ranging from nerdy stuff to grandma wishlists can fit the shame. lol

the second example comes to a need to append categories to a list of movies, mainly, although I can see more of this coming in the next boring days.
meh. :party: