1. dm
  2. RO CSVI
  3. Sunday, 06 January 2019
  4.  Subscribe via email
Hello,

I'm fighting with regular expression without any solution.

I have 2 same fields with 2 rules, I need to change this line:
~000000~~child_product_id=""292""|~S/M~child_product_id=""579""|

To (1 field):
000000

and to (2 field):
S/M


How can I do it?


Thanks a lot,
Davide
Accepted Answer Pending Moderation
Hello Tharuna,

Ok, thanks.


Regards,
Davide
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hello Davide,
To get the first 6 characters you don't need to use Regular expression. In Multi replace rule you can select Operation to be Substring and set Start and End of the characters to be extracted. Let me know if that helps.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hi Tharuna,

thanks.

I use this expression: /[^A-ZV]/ to get only the letters.
But, which one I have to use to get the first 6 numbers?

I tried with this, but it's not working... /[^0-9]\d{6}/

Thanks,
Davide
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello Davide,
Try the regex as in the attached screenshot and let me know if it solves your issue.

Screenshot 2019-01-08 at 5.17.08 PM.png
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hi Tharuna,

I need to clean to export the custom field of the product export.

In the first case I need to see only the 000000, the color of custom fields for all.
In the second one, only S/M, the size.

I need to remove the rest: ~~child_product_id=""292""

I'm using the rules find/replace, but I need a regular expression for removing the dynamic values.


Thanks a lot,
Davide
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello Davide,
Can you explain on what you are trying to find and what you to replace with? If you are trying to replace 000000 to S/M, why not use Find and Replace in Multi replace rule and why regular expression?
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!