문제

In CSV file I have couple thousands strings similar to that 20024la - (character number may vary but there is always white space before and after dash).

I need to remove all those strings including white spaces but leave everything that is after that.

Example string:

20023la - 100 lt storage cylinder RBA100 - 1120820

"20023la - " has to be removed from that example

도움이 되었습니까?

해결책

You can try like this as well:

^(\b\d+[^\s-]+\s+-\s+)

It will match the first occurance, removing ^ will match ALL.

Demo

다른 팁

Try using a pattern like:

\w+\s-\s(.*)

replace string:

$1

result:

100 lt storage cylinder RBA100 - 1120820

example:

http://regex101.com/r/lD5zE3

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top