Follow

I have a search problem so I decided to use RegEx to solve the problem...

Now I have two problems.

I could use any help,

What would be a RegEx search expression that would find both of the following two items?

[13:21:51 INF]
[13:24:00 DBG]

some content in square brackets where the first two characters are 13 and it is followed by a space.

@XSGeek -

/[13(:\d\d){2}\s(INF|DBG)/

(assuming /<stuff>/ is your "This is regex" quotes)

@XSGeek - been too long since I got a chance to play with regex.

It's like putting on an old favorite t-shirt.

@XSGeek - and you may need to remove the opening bracket - (copy and paste)

@XSGeek - and if it's in N++ - remove the opening and trailing slashes.

@XSGeek - so... to be clear: try this one

13(:\d\d){2}\s+(INF|DBG)

(removing surrounders, and making an assumption that there may be more than 1 space between TS and tag)

@XSGeek

\[13.*[ ].*\]

That maybe? Matches brackets, 13, any number of characters, space, any number of characters, bracket. Remove ^ and $ most likely though.

@XSGeek

Tears and sadness that comes with dealing with Regex?

Sign in to participate in the conversation

CounterSocial is the first Social Network Platform to take a zero-tolerance stance to hostile nations, bot accounts and trolls who are weaponizing OUR social media platforms and freedoms to engage in influence operations against us. And we're here to counter it.