Skip to content

Commit

Permalink
regex for scl conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
sjuergen committed Feb 28, 2024
1 parent 8b07927 commit c4ef54b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ A complete overview of the shortcuts in `VS Code`/`AX Coce` you'll find here: [V

![regex](img/regex.gif)

Valuable search&replace patterns:
||Search field| Replace field|Example|
|-|-|-|-|
| Remove all # for variables of a SCL source | #([A-Za-z]) | $1 | #statVariable --> statVariable
| Remove all { S7_SetPoint := 'False' ... } | \{[A-Za-z0-9 :=';_.]*\} | | Bin2 { S7_SetPoint := 'False'} : "typeStatisticsBin"; --> Bin2 : "typeStatisticsBin"
| Remove "name" | "([A-Za-z]*)" | $1 | |
| TIA-Type to ST-Type | TYPE "([A-Za-z0-9_]*)" | TYPE $1 : | |
| Remove `"` in type declaration | "([A-Za-z0-9_]*)" | $1
## Further information

[AX Code Documentation](https://console.simatic-ax.siemens.io/docs/axcode/vscode-user-snippets)
Expand Down

0 comments on commit c4ef54b

Please sign in to comment.