Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excluding pattern from regex
#1
1. this is text with //a comment

2. this is text with a link http://example.com


Looking for the to correct regular expression to remove from "//" to the end of the line in #1 but not remove "//" to the end of the line in #2

Thanks,
Jim

Edit:
Code:
Copy      Help
s.replacerx("(?<!http:)//.*\r\n")


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)