#1 2009-07-30 12:26

iycgtptyarvg
Member
Registered: 2009-07-30
Posts: 24

RegExpr: Replace ' 123' with '#123'

I have tried using regular expressions, but unfortunately I'm very new with it.

I would like to do the following:

Input:
'My nice number 123.txt'
'Number 123 is nice.txt'

Output:
'My nice number #123.txt'
'Number #123 is nice.txt'

I tried the following, but it doesn't work:
Find : ' [0-9]'
Replace : ' #$0'

Any help would be greatly appreciated.

Offline

#2 2009-07-30 13:26

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,379

Offline

#3 2009-07-31 16:55

iycgtptyarvg
Member
Registered: 2009-07-30
Posts: 24

Re: RegExpr: Replace ' 123' with '#123'

Ok, it doesn't work when using the 'Replace' rule, but it does work when using 'RegExp' rule.

Thanks a lot!

Last edited by iycgtptyarvg (2009-07-31 16:58)

Offline

#4 2009-07-31 21:29

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,379

Re: RegExpr: Replace ' 123' with '#123'

Yes, that would only work in RegEx rule! Replace rule would need a different syntax.

Offline

Board footer

Powered by FluxBB