It is currently March 28th, 2024, 3:48 pm

In RegExp to remove tabs and spaces and line breaks before and after the phrase

Get help with creating, editing & fixing problems with skins
User avatar
ZerOverdriver
Posts: 29
Joined: February 13th, 2017, 8:57 pm

Re: In RegExp to remove tabs and spaces and line breaks before and after the phrase

Post by ZerOverdriver »

:welcome: Hi, friend!
:stop: please think:
1) If you use a substitute , then he will remove spaces between words inside the phrase.
2) Spaces and line breaks are easier to do in a meter, than each time to find the right syntax for the RegExp.
P.S.: And in this case it was necessary to remove not only spaces, but also tabs, and line breaks.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: In RegExp to remove tabs and spaces and line breaks before and after the phrase

Post by jsmorley »

ZerOverdriver wrote::welcome: Hi, friend!
:stop: please think:
1) If you use a substitute , then he will remove spaces between words inside the phrase.
2) Spaces and line breaks are easier to do in a meter, than each time to find the right syntax for the RegExp.
P.S.: And in this case it was necessary to remove not only spaces, but also tabs, and line breaks.
You wouldn't just use Substitute, you would use RegExpSubstitute with a regular expression Substitute. With that, you can do anything we can do in WebParser. That's all WebParser is at the end of the day.

As I said, we are not going to make assumptions in WebParser, it simply downloads the entire resource you point it at, and it is up to you go either parse it correctly with the RegExp option on the parent measure, or use Substitute on the child measure(s) to fine tune some result.
Post Reply