regex - Dealing with square brackets in regular expressions in Notepad++ -


i'm converting csv file database of geeklog cms wordpress posts. unfortunately, contains soms 'autotags' (similar 'shortcodes' in wordpress), square brackets.

i want replace several hundreds of them normal html code search+replace in notepad++ can't find way deal square brackets.

this 'autotag' geeklog: [story:theslugofthepost13122005 anchor text of post]

i've found out can convert "[story" part <a href=" regex "\[]story" can't find way find/select/convert rest of autotag. woud appreciated!

set replace options regular expression:

i used this: (from make out post):

find what:    \[story:(\w+)\s+((\w+\s*)+)?\] replace with: <a href="$1">$2</a> 

it replaces

[story:theslugofthepost13122005 anchor text of post] 

with

<a href="theslugofthepost13122005">the anchor text of post</a> 

edit

just clarify, main problem not escaping square brackets, denote character class in regex, example: [ should \[


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -