You are here: PSPad forum > English discussion forum > How to combine several regular expressions

How to combine several regular expressions

Goto Page: Previous1 2 3 4 5 Next

#31 Re: How to combine several regular expressions

Posted by: pspad | Date: 11/01/2017 10:56 | IP: IP Logged

pspad:
Just tested. When I save it as ANSI 1251, PSPad isn't able to detect correct encoding cause there isn't enough cyrilic characters.
In this case I change encoding in menu Encoding to Ansi 1251 and reload (Ctrl+R) to see correct content

When I save your sample to UTF-8 no BOM and reopen it. PSpad open it correctly as UTF-8 file.

I made some modification in autodetect algorithm and now I am PSPad detects your sample (even there is few letters only) correctly as ANSI 1251

Options: Reply | Quote | Up ^


#32 Re: How to combine several regular expressions

Posted by: pspad | Date: 11/01/2017 11:10 | IP: IP Logged

MAKI, can you tell me please how will you do encoding autodetection? ANSI files doesn't contains any code page information.
Give me any reasonable suggestion what will lead to better autodetection and I will do it.

Options: Reply | Quote | Up ^


#33 Re: How to combine several regular expressions

Posted by: maki | Date: 11/01/2017 11:12 | IP: IP Logged

pspad:

If you want to search for '\' char, you need to escape it with '\' char. It means you will use \\, not a \\\

Now, I'm using \\
Nothing has been extracted, so it's still an invalid regex.

Options: Reply | Quote | Up ^


#34 Re: How to combine several regular expressions

Posted by: pspad | Date: 11/01/2017 11:16 | IP: IP Logged

Simple question. Is there any reason why don't you use remove tag function from the HTML menu? It doesn't work for you?

Options: Reply | Quote | Up ^


#35 Re: How to combine several regular expressions

Posted by: pspad | Date: 11/01/2017 11:18 | IP: IP Logged

You wrote example earlier:
<br>А __<br>Так же ", \"сонный\", \" убитый\". Глупоо человек доверяет мне.<br>

What should be result? Can you wrote result text?

Options: Reply | Quote | Up ^


#36 Re: How to combine several regular expressions

Posted by: maki | Date: 11/01/2017 11:18 | IP: IP Logged

Disable detect HTML/XML CharsetMy settings from another text editor, properly detect virtually any encoding system.

image

Edited 1 time(s). Last edit at 11/01/2017 11:20 by maki.

Options: Reply | Quote | Up ^


#37 Re: How to combine several regular expressions

Posted by: pspad | Date: 11/01/2017 11:22 | IP: IP Logged

What I can say is that PSPad in my computer was able to detect UTF-8 (without BOM) from your sample correctly.
There is possible that your text contains not only UTF-8 but mixed ANSI and UTF characters. In this case UTF-8 encoding can't be used, cause it will cause damage of ansi characters.

Options: Reply | Quote | Up ^


#38 Re: How to combine several regular expressions

Posted by: maki | Date: 11/01/2017 11:24 | IP: IP Logged

pspad:
You wrote example earlier:
<br>А __<br>Так же ", \"сонный\", \" убитый\". Глупоо человек доверяет мне.<br>

What should be result? Can you wrote result text?

code remove
<br>А __<br>Так же ", \"сонный\", \" убитый\". Глупоо человек доверяет мне.<br>
code remove

It should only extract the text + tag <br> or >/br>
<br>А __<br>Так же ", \"сонный\", \" убитый\". Глупоо человек доверяет мне.<br>

Options: Reply | Quote | Up ^


#39 Re: How to combine several regular expressions

Posted by: pspad | Date: 11/01/2017 11:27 | IP: IP Logged

maki:

<br>А __<br>Так же ", \"сонный\", \" убитый\". Глупоо человек доверяет мне.<br>

It should only extract the text + tag <br> or >/br>
<br>А __<br>Так же ", \"сонный\", \" убитый\". Глупоо человек доверяет мне.<br>

Sorry, but it looks like you make fun of me. Both lines are same. Can you write text after using regular expression? Result what do you want to get.

Options: Reply | Quote | Up ^


#40 Re: How to combine several regular expressions

Posted by: maki | Date: 11/01/2017 11:32 | IP: IP Logged

The header

charset=windows-1251

means Cyrillic. You will have to change this to

charset=UTF-8

if you want to display the HTML in UTF-8 encodings.

The solution is:
How to Disable in PSPad ?
Detect HTML/XML Charset

Options: Reply | Quote | Up ^


Goto Page: Previous1 2 3 4 5 Next





Editor PSPad - freeware editor, © 2001 - 2017 Jan Fiala
Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák