Sign in to follow this  
Followers 0
wojciech

StringRegExpReplace - wrong pattern

1 post in this topic

#1 ·  Posted (edited)

Hi guys!

I have text file with lines:

Good text - something
100 $ unnecessary text
Good text - something
Good text - something
Good text - something
080 $ unnecessary text

I want remove all line starting with:

3 digits + space + $ sign + any text.

I try:

StringRegExpReplace($sTextToReplace, '([0-9]{3})[:space:]\x{24}', "")

StringRegExpReplace($sTextToReplace, '(?-i[0-9]{3}[:space:]\x{24}(?s)', "")

Work great with:

StringRegExpReplace($sTextToReplace,"\d{3}\s\$.+", "")

Question Solved.

Edited by wojciech

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0