Last active
August 14, 2019 07:13
-
-
Save anovsiradj/db822e459b2dc160549a9f3fd1d74d5b to your computer and use it in GitHub Desktop.
replace non-number and/or non-alphabet from string use free pascal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fpc~3 // | |
program HelloWorld; | |
uses RegExpr; | |
var rgx_1,rgx_2,str_1 :string; | |
var rst :string; | |
begin | |
rgx_1 := '[^0-9]+'; | |
rgx_2 := '[^a-zA-Z]+'; | |
rgx_2 := '[^0-9a-zA-Z]+'; | |
str_1 := '1.333-4444 999 f- 00+122'; | |
rst := ReplaceRegExpr(rgx_3, str_1, '', True); | |
WriteLn(rst); | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment