0
<Etiketler>banko sistem nedir|normal sistemle banko sistem arasındaki fark nedir|sistem|sistem kazançlı mıdır|sistem nasıl oynanır|sistem ne işe yarar|sistem nedir|sistem sıfır nasıl oynanır | bahiskritik.com </Etiketler>

i have this case in my xml file. and i try raplace with this

<Etiketler>(.*?)[\|](.*?)<\/Etiketler\>

with this

<Etiketler>$1 , $2</Etiketler>

but only changing first " | " case. Can you please help me?

MyStackRunnethOver
  • 4,872
  • 2
  • 28
  • 42
  • why not just find -> replace all '|' to ' , ' (point being, I don't see the need for a regex) – aaaaaa Aug 10 '17 at 22:04
  • becouse file too big. and < img > case have same "|" char. i just want to change in < Etiketler> case. understand? – Ismail Altunören Aug 10 '17 at 22:05
  • [you can't parse html with regex](https://stackoverflow.com/a/1732454/984407) – aaaaaa Aug 10 '17 at 22:06
  • i did use all. but only changing first | char. like this. banko sistem nedir "," normal sistemle banko sistem arasındaki fark nedir|sistem|sistem kazançlı mıdır|sistem nasıl oynanır|sistem ne işe yarar|sistem nedir|sistem sıfır nasıl oynanır | bahiskritik.com – Ismail Altunören Aug 10 '17 at 22:07
  • I'm saying you're going about your problem the wrong way. Don't use a regex to modify html. Use an html parser then find and replace the characters like I mentioned above. – aaaaaa Aug 10 '17 at 22:08
  • 2
    If you have no nested tags inside the `Etiketler` tag, you can use `(?:\G(?!^)|)[^|<]*?\K\|` Notepad++ regex. – Wiktor Stribiżew Aug 10 '17 at 22:37

0 Answers0