Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
syntax:pe [2018/07/24 19:53]
nicolae Fixed typo
syntax:pe [2019/11/22 19:03] (current)
ersen fix expansion offset and length for substring expansion
Line 392: Line 392:
 ==== Using only Offset ==== ==== Using only Offset ====
 In the first form, the expansion is used without a length value, note that the offset 0 is the first character: In the first form, the expansion is used without a length value, note that the offset 0 is the first character:
-<​code>​echo ${MYSTRING:34}</​code>​+<​code>​echo ${MYSTRING:35}</​code>​
 => ''<​del>​Be liberal in what you accept, and </​del>​conservative in what you send''​ => ''<​del>​Be liberal in what you accept, and </​del>​conservative in what you send''​
  
 ==== Using Offset and Length ==== ==== Using Offset and Length ====
 In the second form we also give a length value: In the second form we also give a length value:
-<​code>​echo ${MYSTRING:34:13}</​code>​+<​code>​echo ${MYSTRING:35:12}</​code>​
 => ''<​del>​Be liberal in what you accept, and </​del>​conservative<​del>​ in what you send</​del>''​ => ''<​del>​Be liberal in what you accept, and </​del>​conservative<​del>​ in what you send</​del>''​
  
  • syntax/pe.txt
  • Last modified: 2019/11/22 19:03
  • by ersen