Anyway this is going to be short post and more of a note to myself. Needed to do some regex in order to remove the [] sections from a string like this:
ab[123]cde[456]fgh\[.*\] gives me abfghTo get a non-greedy match, you need to append ? after .* so:
\[.*?\] yields abcdefgh
No comments:
Post a Comment