Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing words case or abbreviation in sentences
#9
Macro Macro2119
Code:
Copy      Help
str ff="the phrase where i want the i in upper case, no, and Op. etc: more? bb, cc"

;simple words
str replacements=
;i,I
;no,N°
;Op.,Opus
ICsv x._create; x.FromString(replacements)
int i
for i 0 x.RowCount
,ff.findreplace(x.Cell(i 0) x.Cell(i 1) 2)

;regular expressions
replacements=
;" *: *", " - "
;" *, *", " "
;\?, !
x.FromString(replacements)
for i 0 x.RowCount
,ff.replacerx(x.Cell(i 0) x.Cell(i 1))

out ff


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)