NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Regular Expressions


Joined: 07 Mar 2006
Posts: 22
Reply with quote
Hello,
I did a board search and found some old topics relating to Regular Expressions. I am right now evaluating 4.5.0 and I was wondering why a regex like this one wouldn't work

Code:
(^\d{4})(.*)\n


Sincerely,
Joe Belmaati
Copenhagen Denmark
View user's profileFind all posts by Joe BelmaatiSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
\n won't work, use $ as a line end instead, and IMHO ^ should be out of the brackets:

^(\d{4})(.*)$
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 07 Mar 2006
Posts: 22
Reply with quote
I am not using \n to identify the line end - I am using it to identify a new line. The difference is significant when trying to find and replace multiple lines at a time. Will this feature be available sometime soon?
View user's profileFind all posts by Joe BelmaatiSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
no. Regexp for find/replace works in single-line mode only.
Can't say if multiline will be ever implemented.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Regular Expressions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic